Post XML dato With ASIFormDataRequest error

ufsirfi

New Member
\[quote\]\[code\]NSURL *postUrl =[[NSURL alloc] initWithString:mainString];\[/code\]\[/quote\]\[code\]ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:postUrl];[request setResponseEncoding:NSUTF8StringEncoding];NSString *msgLength = [NSString stringWithFormat:@"%d", [xmlString length]];[request addRequestHeader:@"Content-Length" value:msgLength];NSString *contentType = [NSString stringWithFormat:@"application/xml"];[request addRequestHeader:@"Content-Type" value:contentType];\[/code\]// [request addRequestHeader:@"Content-Type" value:@"application/json"];//Test For JSON is good [request appendPostData:theData]; [request buildPostBody]; [request setRequestMethod:@"POST"];\[code\][request setDelegate:self];[request startAsynchronous];[request setTimeOutSeconds:20];//
 
Back
Top