Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Awesm:Url) add option for encoding urls used in the url parameter #18

Open
mdurn opened this issue Apr 25, 2012 · 0 comments
Open

(Awesm:Url) add option for encoding urls used in the url parameter #18

mdurn opened this issue Apr 25, 2012 · 0 comments
Labels

Comments

@mdurn
Copy link
Collaborator

mdurn commented Apr 25, 2012

For example, if the target url is:
http://www.example.com/?param1=1&param2=2

the & should be encoded as %26 before appending to the awesm api call. If the url is being appended as a parameter to 'destination' (e.g. twitter), the target url needs to be double encoded (& becomes %2526):

http://api.awe.sm/url/share?v=3&url=http://www.example.com/?param1=1%2526param2=2&key=5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9&tool=mKU7uN&channel=twitter&destination=http://twitter.com/intent/tweet?text=This+is+the+coolest+API+evar!%26url=AWESM_URL%26via=awesm&parent=awe.sm_s5d99&user_id=42

Characters requiring encoding:

  • & => %26
  • % => %25
  • => %23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant