我现在想向WCF端的服务器post请求,post请求带参数
参数是:{"UserName":"zack3","Password":"1111111111"}的json字符串,服务器端参数是解析json
NSURL *url = [NSURL URLWithString:@"http://192.168.3.24/WCFServices/Login
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request startSynchronous];
[request setPostValue:@"Ben" forKey:@"first_name"];
[request setPostValue:@"Copsey" forKey:@"last_name"];
[request setTimeOutSeconds:10];
[request addRequestHeader:@"Content-Type" value:@"text/xml; charset=utf-8"];
NSError *error = [request error];
if (!error) {
NSString *response = [request responseString];
}
请问我怎么把这段参数post过去,并且返回的数据不是乱码,急急急
------解决方案--------------------
------解决方案--------------------