Advertisement
Gustavo_Inzunza

funcionando

Sep 28th, 2017
63
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.     NSString *url = @"http://54.207.80.28/api-lebox/cita/prueba_rest?estudio=1.2.392.200036.9116.2.6.1.48.1221427835.1498576907.40487";
  6.     NSURLRequest *Request = [NSURLRequest requestWithURL:[NSURL URLWithString: url]];
  7.     NSURLResponse *resp = nil;
  8.     NSError *error = nil;
  9.     NSData *response = [NSURLConnection sendSynchronousRequest: Request returningResponse: &resp error: &error];
  10.     NSString *responseString = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];
  11.     NSLog(@"%@",responseString);
  12.     return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement