有人可以解释我如何用cocoa读取(或至少将其下载为XML)? 我试过这样的。这可能是完全错误的:)。
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://larcus.tumblr.com/api/read"]];
[request setHTTPMethod:@"POST"];
[request addValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"];
[request addValue: [NSString stringWithFormat:@"multipart/form-data; boundary=%@",[NSString MIMEBoundary]] forHTTPHeaderField: @"Content-Type"];
[NSURLConnection connectionWithRequest:request delegate:self];
[request release];
在connectionDidFinishLoading:方法中,我只是无法解析数据。 提前谢谢!