@@ -99,6 +99,7 @@ export interface APIClientRequestHeaders {
99
99
export type APIClientRequestOpts = {
100
100
headers ?: APIClientRequestHeaders ;
101
101
timeout ?: number ;
102
+ isFormData ?: boolean ;
102
103
} ;
103
104
export class APIClient {
104
105
private hostname : string ;
@@ -136,7 +137,7 @@ export class APIClient {
136
137
endpoint : string ,
137
138
query ?: { [ key : string ] : any } ,
138
139
body ?: Params ,
139
- opts : http . RequestOptions & { timeout ?: number ; isFormData ?: boolean } = { }
140
+ opts : APIClientRequestOpts = { }
140
141
) : Promise < Resp > {
141
142
const fullPath = this . buildFullPath ( endpoint , query ) ;
142
143
const headers : http . OutgoingHttpHeaders = opts . isFormData
@@ -168,7 +169,7 @@ export class APIClient {
168
169
endpoint : string ,
169
170
query ?: { [ key : string ] : any } ,
170
171
body ?: Params ,
171
- opts : http . RequestOptions & { timeout ?: number ; isFormData ?: boolean } = { }
172
+ opts : APIClientRequestOpts = { }
172
173
) : Promise < Resp > {
173
174
const fullPath = this . buildFullPath ( endpoint , query ) ;
174
175
const headers : http . OutgoingHttpHeaders = opts . isFormData
@@ -200,7 +201,7 @@ export class APIClient {
200
201
endpoint : string ,
201
202
query ?: { [ key : string ] : any } ,
202
203
body ?: Params ,
203
- opts : http . RequestOptions & { timeout ?: number } = { }
204
+ opts : APIClientRequestOpts = { }
204
205
) : Promise < Resp > {
205
206
const fullPath = this . buildFullPath ( endpoint , query ) ;
206
207
const bodyContent = JSON . stringify ( body ) ;
@@ -225,7 +226,7 @@ export class APIClient {
225
226
endpoint : string ,
226
227
query ?: { [ key : string ] : any } ,
227
228
body ?: void ,
228
- opts : http . RequestOptions & { timeout ?: number } = { }
229
+ opts : APIClientRequestOpts = { }
229
230
) : Promise < Resp > {
230
231
const fullPath = this . buildFullPath ( endpoint , query ) ;
231
232
return this . request < Resp , void > ( {
0 commit comments