mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-23 06:49:27 +08:00
19 lines
633 B
TypeScript
19 lines
633 B
TypeScript
/// <reference types="node" />
|
|
import { Options as AsyncOptions } from 'then-request';
|
|
import { FormData, FormDataEntry } from './FormData';
|
|
export interface BaseOptions extends Pick<AsyncOptions, 'allowRedirectHeaders' | 'followRedirects' | 'gzip' | 'headers' | 'maxRedirects' | 'maxRetries' | 'qs' | 'json'> {
|
|
agent?: boolean;
|
|
cache?: 'file';
|
|
retry?: boolean;
|
|
retryDelay?: number;
|
|
socketTimeout?: number;
|
|
timeout?: number;
|
|
body?: string | Buffer;
|
|
}
|
|
export interface Options extends BaseOptions {
|
|
form?: FormData;
|
|
}
|
|
export interface MessageOptions extends BaseOptions {
|
|
form?: FormDataEntry[];
|
|
}
|