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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -