changed types around
This commit is contained in:
parent
24e82bbb78
commit
f61d1aa0c3
75 changed files with 3625 additions and 34314 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { EventEmitter } from 'eventemitter3';
|
||||
import type {
|
||||
import {
|
||||
HttpClientConfig,
|
||||
RequestConfig,
|
||||
HttpResponse,
|
||||
|
|
@ -123,12 +123,12 @@ export class BunHttpClient extends EventEmitter {
|
|||
|
||||
private mergeConfig(config: RequestConfig): RequestConfig {
|
||||
return {
|
||||
...config,
|
||||
timeout: this.defaultConfig.timeout,
|
||||
retries: this.defaultConfig.retries,
|
||||
headers: { ...this.defaultConfig.headers, ...config.headers },
|
||||
validateStatus: this.defaultConfig.validateStatus,
|
||||
url: this.buildUrl(config.url),
|
||||
...config
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
import { EventEmitter } from 'eventemitter3';
|
||||
import type {
|
||||
import {
|
||||
RetryConfig,
|
||||
RequestConfig,
|
||||
HttpResponse,
|
||||
HttpClientError,
|
||||
TimeoutError,
|
||||
RetryExhaustedError
|
||||
} from './types';
|
||||
import { TimeoutError } from './types';
|
||||
|
||||
export class RetryHandler extends EventEmitter {
|
||||
private config: Required<RetryConfig>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue