ios alamofire4.x网络框架url 中文问题

一种方式是把参数放到Parameters里面就可以了

还有中文在path上 比如    http://www.chao.com/chao/name/张三

这种方式需要处理url编码  url是字符串类型

url.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""

猜你喜欢

转载自www.cnblogs.com/rchao/p/11739853.html