我不得不使用asihttprequest将json字符串发送到我的wcf rest web服务。 这是我的代码
NSString *jsonString=@"{\"user\":{\"EmailId\":\"bpsingh216@gmail.com\",\"Password\":\"kiran@123\",\"UserDetails\":{\"FirstName\":\"Kiran\",\"LastName\":\"Kuyate\"}}}";
NSURL *url = [NSURL URLWithString:@"http://182.72.47.242:52/UserService/MemberSignUp"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setRequestMethod:@"POST"];
[request addRequestHeader:@"Accept" value:@"application/json"];
[request addRequestHeader:@"content-type" value:@"application/x-www-form-urlencoded"];
[request appendPostData:[jsonString dataUsingEncoding:NSUTF8StringEncoding]];
[request setDelegate:self];
[request startAsynchronous];
任何人都可以指导我,我做错了吗?