Advertisement
Gustavo_Inzunza

funciona

Sep 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <Foundation/Foundation.h>
  2.  
  3. int main(int argc, const char * argv[])
  4. {
  5.    
  6.    NSString *twitterUrl = @"http://54.207.80.28/api-lebox/versiones";
  7.    // NSString *resp = [self makeRestAPICall: twitterUrl];
  8.      NSURLRequest *Request = [NSURLRequest requestWithURL:[NSURL URLWithString: twitterUrl]];
  9.     NSURLResponse *resp = nil;
  10.     NSError *error = nil;
  11.     NSData *response = [NSURLConnection sendSynchronousRequest: Request returningResponse: &resp error: &error];
  12.     NSString *responseString = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
  13.     NSLog(@"%@",responseString);
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement