我在 ASIHTTPRequest 中的代码是:
NSURL *url = [NSURL URLWithString:@"http://avicenna-apps.com/harleyeventget.php"];
ASIHTTPRequest *_Request = [ASIHTTPRequest requestWithURL:url];
__weak ASIHTTPRequest * Request=_Request;
[Request setCompletionBlock:^{
NSData *Data = [Request responseData];
];
[Request setFailedBlock:^{
NSError *error = [Request error];
NSlog(@"Error IS %@,error");
}];
[Request startAsynchronous];
我如何在 AFNetwork 中编写它?