ios - URL format for SOAP Web service that returns a JSON response -
i'm building ios app relies on web service. (using nsmutableurlrequest)
i've been trying connect web service api gives json response based on parameters in url. i'm getting invalid json parameters.
the guys host api have said http request should have following format:
https://thewebserviceapi?parameters={“api_key”:”your_api_ key”,”query”:{“perpage”:50}}
i'm having no luck connecting @ all. under impression url's parameters had format: https://thewebserviceapi?firstparam=firstparamvalue&secondparam=secondparamvalue
but format not working me.
can tell me correct format should url?
apparently double quotes required. working this:
nsstring *urlstring = @"https://webserviceapi?parameters={\"api_key\":\"your_api_key\",\"query\":{\"perpage\":50}}"; nsmutableurlrequest *request = [nsmutableurlrequest requestwithurl: [nsurl urlwithstring:urlstring]];
Comments
Post a Comment