Skip to content

Instantly share code, notes, and snippets.

@armstrongnate
Last active December 17, 2015 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armstrongnate/5592095 to your computer and use it in GitHub Desktop.
Save armstrongnate/5592095 to your computer and use it in GitHub Desktop.
JSON HTTP request in objective-c
NSURL *wiresUrl = [NSURL URLWithString:@"http://blahblah.com.192.168.1.100.xip.io/stuff.json"];
NSData *jsonData = [NSData dataWithContentsOfURL:wiresUrl];
NSError *error = nil;
NSDictionary *dataDictionary = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment