search

Home  >  Q&A  >  body text

Objective-c - Issues with splicing parameters such as NSSesstion AFNetWorking.

Testing in the morning, you can use the complete address, but you won’t get the value once you use parameters to splice it together,

NSDictionary *parameters = @{@"phone" : @"17703430***", @"starttime" : @"2016-3-17%201:50", @"endtime" : @"2016-3-17%2020:51"};

Then use task.originalRequest.URL to view the results as follows:

Normal connection

http://xxx/member.php/Member/BdUpload/getlocationlog?phone=17703430 *&starttime=2016-3-17 1:50&endtime=2016-3-17 20:51

task.originalRequest.URL output connection

http://traffic.aace.com.cn/member.php/Member/BdUpload/getlocationlog?endtime=2016-3-17%252020:51&phone=17703430&starttime=2016-3-17%201:50*

2016-3-17 1:50 becomes 252020:51 and the parameter order is also changed.

过去多啦不再A梦过去多啦不再A梦2792 days ago658

reply all(0)I'll reply

No reply
  • Cancelreply