REST stands for representational state transfer. It is a simple stateless programming paradigm that generally runs over HTTP. The emphasis is on machine to machine communication.
// Header file
@property (weak, nonatomic) IBOutlet UILabel *temperatureLabel;
@property (weak, nonatomic) IBOutlet UITextField *city;
// Implementation file
NSString* location = _city.text;
NSString* urlString = [NSString stringWithFormat:@"http://weather.com/weather.php?location=%@", location];
NSURL *restURL = [NSURL URLWithString:urlString];
NSData *myData = [NSData dataWithContentsOfURL:restURL];
NSString *string = [NSString stringWithFormat:@"%.*s", [myData length], [myData bytes]];
REST stands for representational state transfer. It is a simple stateless programming paradigm that generally runs over HTTP. The emphasis is on machine to machine communication.
// Header file
@property (weak, nonatomic) IBOutlet UILabel *temperatureLabel;
@property (weak, nonatomic) IBOutlet UITextField *city;
// Implementation file
NSString* location = _city.text;
NSString* urlString = [NSString stringWithFormat:@"http://weather.com/weather.php?location=%@", location];
NSURL *restURL = [NSURL URLWithString:urlString];
NSData *myData = [NSData dataWithContentsOfURL:restURL];
NSString *string = [NSString stringWithFormat:@"%.*s", [myData length], [myData bytes]];