0

I am trying to generate XML request to be sent to server over Http Post. I am aware of ASIHttpRequest library and want to use it.

I have two questions regarding this: 1) How to generate XML request? (Which is best library to use? GData/libXML/KissXML? or else?) 2) How to send it to server using ASIHttpRequest?

Please help. Thanks in advance.

iOSDev
  • 3,617
  • 10
  • 51
  • 91

1 Answers1

0

Achieved it this way:

NSString* newStr = [[NSString alloc] initWithData:postBody
                                         encoding:NSUTF8StringEncoding];
NSURL *url = [NSURL URLWithString:urlstr];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"r" forKey:newStr];
request.delegate = self;
[request startSynchronous];   
iOSDev
  • 3,617
  • 10
  • 51
  • 91
  • Can you please explain what is postBody in this case? I have a XML request which I want to post to a server – Yogi Apr 15 '13 at 09:49