🚢 请求属性
Forest请求对象的基本属性和默认值如下表:
| 属性名 | 描述 | 默认值 |
|---|---|---|
| type | 请求类型 | GET |
| scheme | HTTP协议 | http |
| path | 请求地址路径 | / |
| host | 请求主机地址 | localhost |
| port | 请求地址端口 | -1 (代表没有端口号) |
| url | URL地址 | http://localhost/ |
| charset | 请求参数的编码字符集 | UTF-8 |
| async | 是否异步 | false |
| autoRedirection | 是否自动重定向 | true |
| timeout | 请求超时时间 | 3000 (毫秒) |
| decompressResponseGzipEnabled | 是否开启解压GZIP响应内容 | false |
| maxRetryCount | 最大请求重试次数 | 0 |
| maxRetryInterval | 最大请重试的时间间隔 | 0 (毫秒) |
| retryer | 请求重试器 | BackOffRetryer (基于退避算法的重试器) |
帮助我们改善此文档 (opens new window)
上次更新: 2024/12/26, 12:59:11