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

Query parameter is double encoded #59

Closed
novi opened this issue Aug 18, 2015 · 4 comments
Closed

Query parameter is double encoded #59

novi opened this issue Aug 18, 2015 · 4 comments

Comments

@novi
Copy link
Collaborator

novi commented Aug 18, 2015

A query parameter with GET method is double encoded. It converts "あ" into "%25E3%2581%2582", it should be "%E3%81%82".

query property of NSURLComponents will be encoded automatically when getting to complete NSURL. You can use NSURLComponents.percentEncodedQuery or just use NSURLComponents and NSURLQueryItem for query encoding.

@ishkawa
Copy link
Owner

ishkawa commented Aug 18, 2015

Thank you for reporting! Could you check if this issue is fixed in @a3d9621?

@novi
Copy link
Collaborator Author

novi commented Aug 19, 2015

Thanks! It is fine for iOS. But unable to build for Mac since NSURLQueryItem needs OS X 10.10.
(Sorry, I have mentioned NSURLQueryItem has no support for OS X 10.9.)

APIKit/APIKit/Request.swift:84:28: error: 'NSURLQueryItem' is only available on OS X 10.10 or newer

@ishkawa
Copy link
Owner

ishkawa commented Aug 20, 2015

Ah, I've completely forgotten! This may be fixed in @d989ce8.
Please review #60 again.

@novi
Copy link
Collaborator Author

novi commented Aug 24, 2015

Both the platform is Okay. Thank you for fixing.

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

No branches or pull requests

2 participants