Fast request options
FastAxiosRequestConfig<Input> extends AxiosRequestConfig<Input> with the following options.
requestType Mode
Required. Matches the Fast.NET HttpRequestActionEnum OpenAPI output:
type RequestType = "auth" | "query" | "add" | "edit" | "delete" | "submit" | "upload" | "download" | "export" | "import" | "callback" | "other";download and export enter Fast file-response handling. The uni adapter selects file APIs using method: "upload" | "download".
Extension options
| Option | Default | Behavior |
|---|---|---|
cancelDuplicateRequest | true | Deduplicates supported bodies using final URL, method and headers; opaque file bodies require an explicit key. |
loading | false | Calls loading show/close during the request lifecycle. |
loadingText | "加载中..." (Chinese loading message) | Text passed to loading show. |
cache | false | Enables eligible GET RESTful caching only with an explicit nonempty namespace. |
getMethodCacheHandle | true | Adds a timestamp parameter to unencrypted GET requests to avoid browser/proxy response reuse. |
simpleDataFormat | true | Returns only data for successful RESTful JSON responses. |
showErrorMessage | true | Displays HTTP, network, and timeout errors. |
showCodeMessage | true | Displays Fast business code/success errors. |
autoDownloadFile | true | Automatically saves successful browser file responses. |
requestCipher | Global configuration | Calls registered request-encryption and response-decryption handlers. |
restfulResult | true | Validates code/success and processes data according to ApiResponse. |
cacheNamespace | Container namespace | Nonempty identity/tenant/language scope; empty disables request caching. |
duplicateKey | Unset | Explicit deduplication identity for opaque/file bodies; do not include raw credentials. |
Return rules
| Condition | Result |
|---|---|
| Custom response handler returns a non-nullish value | Custom return value |
method: "download" or requestType: "download" | Complete AxiosResponse |
requestType: "export" or Blob response type | Complete AxiosResponse |
Non-JSON + simpleDataFormat: true | response.data |
Non-JSON + simpleDataFormat: false | Complete AxiosResponse |
| JSON + RESTful + simplified mode | data from the decrypted structure |
| Other JSON | Decrypted or original response data |
Throws AxiosError when the business code is outside 200–299 or success is false. Cancellation preserves Axios CanceledError so callers can continue using axios.isCancel().
Boundary behavior
Null/undefined JSON or decrypted values are returned unchanged; other non-object RESTful payloads produce a protocol error. URLSearchParams duplicates and the caller-owned object are preserved. showErrorMessage covers offline and file HTTP failures, independently of showCodeMessage for business protocol failures.
