Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
improved URL encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
dduan committed Jul 13, 2016
1 parent 8c99df9 commit b3baf04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified Docs/QuickStart.zip
Binary file not shown.
4 changes: 3 additions & 1 deletion Just/Just.swift
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,9 @@ public final class HTTP: NSObject, NSURLSessionDelegate, JustAdaptor {
if originalObject is NSNull {
return "null"
} else {
return "\(originalObject)".stringByAddingPercentEncodingWithAllowedCharacters(NSCharacterSet.URLQueryAllowedCharacterSet()) ?? ""
let reserved = NSCharacterSet.URLQueryAllowedCharacterSet().mutableCopy() as! NSMutableCharacterSet
reserved.removeCharactersInString(":#[]@!$&'()*+,;=")
return "\(originalObject)".stringByAddingPercentEncodingWithAllowedCharacters(reserved) ?? ""
}
}

Expand Down

0 comments on commit b3baf04

Please sign in to comment.