ios - Alamofire 请求在一分钟内超时
问题描述
当我调用HTTP POST Request
usingAlamofire
时,它仅在一分钟内超时。实际上,响应是在请求 2 分钟后收到的。那么如何更改 alamofire 中的请求超时间隔?请帮忙……</p>
下面添加了使用 alamofire 发送请求的表单...
Alamofire.request("url", method: .post, parameters: params, encoding: JSONEncoding.default, headers: my custom header
.validate(contentType: ["application/json"])
.responseJSON { (response) in
switch response.result {
case .success(let value):
//code
case .failure(let error):
//code
}
}
解决方案
推荐阅读
- python - 如何既指定环境的路径并使用其名称激活环境
- python - Selenium 无法通过 ID 定位字段
- python - 使用 tika-python 在 Python 中增加 tika 堆大小
- angular - 来自服务的 NgbPopover
- linux - 如何在这个 Centos 8 系统上安装 postgis?得到“错误:问题:无法为该工作安装最佳候选人”
- delphi - RecordSet 中的日期格式
- linux - Docker 特定域到特定容器
- reactjs - 在测试中为 BrowserRouter 设置路由
- javascript - 按滚动百分比从上到下垂直移动图像
- sharepoint - Sharepoint 警报不适用于一个站点上的一个用户