Skip to content

Commit 7857357

Browse files
committed
feat: add support for accepting axios options in sendRequest
Signed-off-by: Dustin Popp <[email protected]>
1 parent 8eaf889 commit 7857357

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/request-wrapper.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export class RequestWrapper {
245245
*/
246246
public async sendRequest(parameters): Promise<any> {
247247
const options = extend(true, {}, parameters.defaultOptions, parameters.options);
248-
const { path, body, form, formData, qs, method, serviceUrl } = options;
248+
const { path, body, form, formData, qs, method, serviceUrl, axiosOptions } = options;
249249
let { headers, url } = options;
250250

251251
const multipartForm = new FormData();
@@ -329,6 +329,7 @@ export class RequestWrapper {
329329
raxConfig: this.raxConfig,
330330
responseType: options.responseType || 'json',
331331
paramsSerializer: { serialize: (params) => stringify(params) },
332+
...axiosOptions,
332333
};
333334

334335
return this.axiosInstance(requestParams).then(

0 commit comments

Comments
 (0)