I have a string: <api address>/<parameters>?fmt=json
When I create an NSURL object from the string, the URL is: <api address>/<parameters>%3Ffmt=json
When I send the request with this URL (using an NSURLSession), however, it gets denied access, as the API wants the ?
and doesn't accept %3F
. How do I decode the URL to have the ?
return so the API will accept the request?
UPDATE
NSURL construction
let urlRequestString = "<api url>?fmt=json&api_key=" + <key>
let apiRequestURL = NSURL(fileURLWithPath: urlRequestString)