NSString Converting @ to %40 on Request
Currently I'm using Resty (http://projects.lukeredpath.co.uk/resty/) to build my own API wrapper for Objective-C.
I digress however, in the request itself, I am able to determine what is actually being sent and it seems that the NSString *email (I scan for an @ to make sure it is a legitimate email before storing in another NSString) is actually chan开发者_StackOverflow社区ged.
An example, joe@example.com has been scanned for the @, and then sent to the NSString *email for the request. However, when I send the actual GET request, the NSString is changed to joe%40example.com.
Is this due to the Resty request, or do I have to encode/decode the NSString before the request?
Yes, you should URL decode and then perform any validation tasks.
Here is what their documentation has:
NSData or any other data-encodable payloads set the request body as-is; encodable payloads will be encoded using UTF8
http://projects.lukeredpath.co.uk/resty/documentation.html
精彩评论