Access a servlet using ASIHTTPRequest
Access a servlet using ASIHTTPRequest
- Subject: Access a servlet using ASIHTTPRequest
- From: Bing Li <email@hidden>
- Date: Sat, 26 Feb 2011 10:32:29 +0800
Dear all,
I tried to access a servlet using ASIHTTPRequest.
URL *url = "" URLWithString:urlString];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL: url];
[request setPostValue:p1 forKey: @"param1"];
[request setPostValue:p2 forKey: @"param2"];
[request setPostValue:p3 forKey: @"param3"];
[request startSynchronous];
NSError *error = [request error];
if (!error)
{
NSLog(@"Sending data well!");
}
else
{
NSLog(@"Sending data wrongly");
}
[url release];
[request release];
Anything wrong with the code?
I appreciate so much for your help!
Best regards,
Bing
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden