Skip to content

Commit f482288

Browse files
authored
Merge pull request #158 from HubSpot/bmatto/axios-data-config
Allow different types of for Data for axios request config
2 parents 75c63d6 + 698d993 commit f482288

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

types/Http.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ReadStream } from 'fs';
2+
import { Stream } from 'stream';
23

34
export type Data = {
45
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15,7 +16,14 @@ export type AxiosConfigOptions = {
1516
env?: string;
1617
localHostOverride?: boolean;
1718
params?: QueryParams;
18-
data?: Data;
19+
data?:
20+
| Data
21+
| string
22+
| ArrayBuffer
23+
| ArrayBufferView
24+
| URLSearchParams
25+
| Stream
26+
| Buffer;
1927
resolveWithFullResponse?: boolean;
2028
timeout?: number;
2129
headers?: Data;

0 commit comments

Comments
 (0)