Added comments
This commit is contained in:
parent
a0b8459a79
commit
10b569e3a9
@ -67,9 +67,17 @@ extension JSONDictionary {
|
||||
}
|
||||
valueString = baseValueString
|
||||
}
|
||||
/*If urlQuery value contains '/' , ':' these characters are passed without encoding, due to this we are seeing inconsistent behaviour.
|
||||
For Eg: value contains a url: https://vzwsso/executeTask
|
||||
Expected: https%3A%2F%2Fvzwsso%2FexecuteTask
|
||||
Current: https://vzwsso/executeTask
|
||||
So removed possible characters from urlQueryAllowed characterSet.
|
||||
*/
|
||||
var characterSet = CharacterSet.urlQueryAllowed
|
||||
characterSet.remove("/")
|
||||
characterSet.remove(":")
|
||||
characterSet.remove("?")
|
||||
characterSet.remove("=")
|
||||
let queryItem = URLQueryItem(name: key, value: valueString.addingPercentEncoding(withAllowedCharacters: characterSet) ?? valueString)
|
||||
queryItems.append(queryItem)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user