Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 阅读Tumblr仪表板_Xml_Cocoa_Api_Parsing_Tumblr - Fatal编程技术网

Xml 阅读Tumblr仪表板

Xml 阅读Tumblr仪表板,xml,cocoa,api,parsing,tumblr,Xml,Cocoa,Api,Parsing,Tumblr,有人能告诉我如何用cocoa阅读(或者至少下载为XML)吗? 我就这样试过了。这可能是完全错误的:) 在ConnectionIDFinishLoading:方法中,我无法解析数据。 提前谢谢你 您没有创建正确的HTTP POST请求 看看如何正确地做这件事 NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://larcus.tumblr.com/a

有人能告诉我如何用cocoa阅读(或者至少下载为XML)吗? 我就这样试过了。这可能是完全错误的:)

在ConnectionIDFinishLoading:方法中,我无法解析数据。
提前谢谢你

您没有创建正确的HTTP POST请求

看看如何正确地做这件事

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];