我正在尝试下面的代码,但它给出了错误:
{
NSURL *url = [NSURL URLWithString:@"http://ielmo.xtreemhost.com/array.php"];
NSURLRequest *urlRequest =[[NSURLRequest alloc]initWithURL:url];
AFHTTPRequestOperation *requestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];
requestOperation.responseSerializer = [AFImageResponseSerializer serializer];
[requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Response: %@", responseObject);
_imV.image = responseObject;
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Image error: %@", error);
}];
[requestOperation start];
}
Run Code Online (Sandbox Code Playgroud)
请帮我解决"Request failed: unacceptable content-type: text/html"
错误.