How to send text messages from ios apps to server via asihttrequest ? If anyone has an example code please help me . Really need help right now
问问题
216 次
1 回答
0
为此,您需要设置 post 变量。
formReq = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:urlString]];
formReq.delegate = self;
[formReq setPostValue:MESSAGE forKey:@"key"];
[formReq startSynchronous];
您需要实现两个委托方法
- (void)requestFinished:(ASIHTTPRequest *)request{
NSLog(@"requestFinished: %@", [request responseString]);
}
- (void)requestFailed:(ASIHTTPRequest *)request
{
NSError *error = [request error];
NSLog(@"oops: %@", [error localizedDescription]);
}
于 2013-10-24T06:05:28.553 回答