【发布时间】:2021-01-09 21:38:52
【问题描述】:
我正在尝试使用 alamofire 发送 API 获取请求,但是当我使用以下 url:https://stuntmans.evosale.se/admin/api/dräkt 时,“dräkt”中的特殊字符将返回无效的 url 作为响应。我将如何在 alamofire 中使用特殊字符?
提前致谢!
下面是部分代码:
let headers: HTTPHeaders = [
.authorization(username: "Username", password: "Password"),
.accept("application/json")]
AF.request(https://stuntmans.evosale.se/admin/api/dräkt, headers: headers).validate().responseJSON { response in
【问题讨论】: