2012-02-25 117 views
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];

回答