0
我有这样的代码:需要帮助使用AsiHttpRequest
- (void)postRequestWithURLState:(NSString *)url
{
NSString *bodyRequest = nil;
NSURL *requestURL = [NSURL URLWithString:url];
NSMutableURLRequest *theRequest = [[NSMutableURLRequest alloc] init];
//NSLog(@"-------------- bodyRequest: %@", bodyRequest);
[theRequest setURL:requestURL];
[theRequest setTimeoutInterval:0.5];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody:[bodyRequest dataUsingEncoding:NSASCIIStringEncoding]];
[self.oauthAuthentication authorizeRequest:theRequest];
NSURLConnection *conn = [NSURLConnection connectionWithRequest:theRequest delegate:self];
self.web = conn;
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}
难道不可能性做使用AsiHttpRequest同样的事情? 我在文档中找不到像[self.oauthAuthentication authorizeRequest:theRequest];