From 7c3cdb6329700085a59b2e950fd5752a6c7f7598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Tue, 9 Jul 2024 15:42:26 +0200 Subject: [PATCH] clients/web/docs: remove Content-Type header from curl command if no body --- clients/apps/web/src/components/Documentation/openapi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/apps/web/src/components/Documentation/openapi.ts b/clients/apps/web/src/components/Documentation/openapi.ts index de2085e938..d6b7dff468 100644 --- a/clients/apps/web/src/components/Documentation/openapi.ts +++ b/clients/apps/web/src/components/Documentation/openapi.ts @@ -470,7 +470,7 @@ export class CURLCommandBuilder extends CommandBuilder { this.endpoint.security && this.endpoint.security.length > 0 const headers = [ - `-H "Content-Type: ${mediaType}"`, + ...(mediaType ? [`-H "Content-Type: ${mediaType}"`] : []), '-H "Accept: application/json"', ...(hasSecurityScheme ? ['-H "Authorization: Bearer "'] : []), ]