JSON POST Request on the iPhone (Using HTTPS)

后端 未结 4 527
攒了一身酷
攒了一身酷 2020-12-23 15:47

I have a WCF service hosted and I\'m trying to use it within an iPhone app as a JSON POST request. I plan on using the JSON serializer later, but this is what I have for the

4条回答
  •  青春惊慌失措
    2020-12-23 16:00

    change

    NSData *requestData = [NSData dataWithBytes:[jsonRequest UTF8String] length:[jsonRequest length]];
    

    to

    NSData *requestData = [jsonRequest dataUsingEncoding:NSUTF8StringEncoding];
    

提交回复
热议问题