FlyJSONP icon indicating copy to clipboard operation
FlyJSONP copied to clipboard

Ampersand trouble

Open TheOddLinguist opened this issue 13 years ago • 1 comments

When I send a request (POST request for authentication, in this specific case) with an ampersand as part of one of the params, it disappears by the time it gets to my webapp. I'm guessing it's because there's a part of the process that mistakes it as an ampersand in a query string or something like that. Any idea how to get around this issue? Perhaps do some other encode/decode before calling FlyJSONP, like Base64, to avoid the characters? (Although that has equals signs; perhaps that'd be an issue, too?)

TheOddLinguist avatar Feb 28 '12 04:02 TheOddLinguist

TheOddLinguist, I hope you've solved your problem by now but just in case & for anyone else running into similar: yes, your params are being sent to the server as part of a URL string so any reserved characters need to be encoded. Javascript's built in encodeURI will handle this nicely.

starpause avatar Apr 14 '13 16:04 starpause