Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 26626bd

Browse files
Merge pull request #1 from Dotmatics/accept-change-to-everything
update to accept everything
2 parents 20d5831 + c906367 commit 26626bd

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/templates/core/angular/getHeaders.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const getHeaders = (config: OpenAPIConfig, options: ApiRequestOptions): O
77
}).pipe(
88
map(({ token, username, password, additionalHeaders }) => {
99
const headers = Object.entries({
10-
Accept: 'application/json',
10+
Accept: '*/*',
1111
...additionalHeaders,
1212
...options.headers,
1313
})

src/templates/core/axios/getHeaders.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
99
const formHeaders = typeof formData?.getHeaders === 'function' && formData?.getHeaders() || {}
1010

1111
const headers = Object.entries({
12-
Accept: 'application/json',
12+
Accept: '*/*',
1313
...additionalHeaders,
1414
...options.headers,
1515
...formHeaders,

src/templates/core/fetch/getHeaders.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
77
]);
88

99
const headers = Object.entries({
10-
Accept: 'application/json',
10+
Accept: '*/*',
1111
...additionalHeaders,
1212
...options.headers,
1313
})

src/templates/core/node/getHeaders.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
77
]);
88

99
const headers = Object.entries({
10-
Accept: 'application/json',
10+
Accept: '*/*',
1111
...additionalHeaders,
1212
...options.headers,
1313
})

src/templates/core/xhr/getHeaders.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
77
]);
88

99
const headers = Object.entries({
10-
Accept: 'application/json',
10+
Accept: '*/*',
1111
...additionalHeaders,
1212
...options.headers,
1313
})

test/__snapshots__/index.spec.ts.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
384384
]);
385385

386386
const headers = Object.entries({
387-
Accept: 'application/json',
387+
Accept: '*/*',
388388
...additionalHeaders,
389389
...options.headers,
390390
})
@@ -3479,7 +3479,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
34793479
]);
34803480

34813481
const headers = Object.entries({
3482-
Accept: 'application/json',
3482+
Accept: '*/*',
34833483
...additionalHeaders,
34843484
...options.headers,
34853485
})

0 commit comments

Comments
 (0)