Для этого вам не нужна библиотека.
Чтобы отправить запрос на синхронную GET:
//set up the GET URL and params
NSURL *getURL = [NSURL URLWithString:@"http://somesite.com/somepath?foo=bar"];
//create the request
NSURLRequest *request = [NSURLRequest requestWithURL:getURL];
//get the response
NSError *error = nil;
NSURLResponse *response = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
Чтобы отправить запрос синхронное POST:
//set up the POST URL and params
NSURL *postURL = [NSURL URLWithString:@"http://somesite.com/somepath"];
NSString *postParams = @"foo=bar&hello=world";
//create the request - this bit is the same for every post
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:postURL];
[request setHTTPMethod:@"POST"];
[request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSData *data = [postParams dataUsingEncoding:NSUTF8StringEncoding];
[self addValue:[NSString stringWithFormat:@"%i", [data length]] forHTTPHeaderField:@"Content-Length"];
[self setHTTPBody:data];
//get the response
NSError *error = nil;
NSURLResponse *response = nil;
NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
В любом случае, если responseData равен нулю или ошибка не ноль, представить уведомление с помощью следующие:
[[[[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease] show];
RestKit немного отличается от ASI - это скорее структура синхронизации для автоматического преобразования ответов JSON в графы объектов. Это определенно переполняет то, что пытается сделать ОП. –
@ Randall, как вы управляете ситуацией без подключения к Интернету? –