Skip to content

Commit db913cc

Browse files
committed
Refactor useApiTester to simplify Accept header handling by removing redundant contentType check
1 parent 1e577f6 commit db913cc

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

spa/src/components/api-tester/useApiTester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function buildInitialRequest(endpoint: Endpoint, baseUrl: string, spec: OpenApiS
9696
if (contentType) {
9797
headers.unshift(makePair('Content-Type', contentType, true));
9898
}
99-
headers.push(makePair('Accept', contentType ?? detectResponseContentType(endpoint), true));
99+
headers.push(makePair('Accept', detectResponseContentType(endpoint), true));
100100

101101
let body = '';
102102
const bodyContent = endpoint.requestBody?.content;

0 commit comments

Comments
 (0)