我正在尝试解析 JSON,并得到一个 SIGABRT 错误:reason: '[<NSURLRequest 0x7e7e970> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Content-Type.
我的代码是:
self.responseData = [NSMutableData data];
NSURLRequest *request = [NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://dmsfw01.dev.com:8082/G.FQI/GVOLFQI.svc/Search(v)?Start=1&Count=10"]];
NSString *contentType = @"application/json";
[request setValue:contentType forKey:@"Content-Type"];
[[NSURLConnection alloc] initWithRequest:request delegate:self];
我应该怎么做才能设置 Content-Type?