iphone - How to get a data from an URL -
an api http://www.yourwebservice.com/pip.jsp?request=aaa¶m=2
lets consider above api gives json value. use below coding json:
nsurl *url =[nsurl urlwithstring:@"http://www.yourwebservice.com/pip.jsp?request=aaa¶m=2"]; nsstring *resultedstring=[[nsstring alloc] initwithcontentsofurl:url]; it returns json resultedstring variable. small amount of data. if api has large amount of data in 100's of kb's whether coding work fine, or crash?
many apis limit responses - example, twitter api not return more 1500 results.
Comments
Post a Comment