0

Can somebody explain me how I can read the (or download it as XML at least) with cocoa? I tried it like that. It might be totally wrong :).

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

In the connectionDidFinishLoading: method I'm just not able to parse the data. Thank you in advance!

lbrndnr
  • 3,361
  • 2
  • 24
  • 34

1 Answers1

1

You're not creating a proper HTTP POST request.

Have a look at my answer to this question for how to do it properly.

Community
  • 1
  • 1
Rob Keniger
  • 45,830
  • 6
  • 101
  • 134