From 47ec8b88d5d837079a99a359ec09bc29cf67045c Mon Sep 17 00:00:00 2001 From: Alex Rybchenko Date: Wed, 19 Oct 2022 14:13:56 +0200 Subject: [PATCH] set application/json header Signed-off-by: Alex Rybchenko --- .changeset/poor-moons-impress.md | 5 +++++ plugins/tech-insights/src/api/TechInsightsClient.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/poor-moons-impress.md diff --git a/.changeset/poor-moons-impress.md b/.changeset/poor-moons-impress.md new file mode 100644 index 0000000000..f441cba1f2 --- /dev/null +++ b/.changeset/poor-moons-impress.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights': patch +--- + +Set content type to 'application/json' in TechInsightsClient diff --git a/plugins/tech-insights/src/api/TechInsightsClient.ts b/plugins/tech-insights/src/api/TechInsightsClient.ts index 6e85769b34..0f55a8f8e1 100644 --- a/plugins/tech-insights/src/api/TechInsightsClient.ts +++ b/plugins/tech-insights/src/api/TechInsightsClient.ts @@ -82,6 +82,9 @@ export class TechInsightsClient implements TechInsightsApi { { method: 'POST', body: JSON.stringify(requestBody), + headers: { + 'content-type': 'application/json', + }, }, ); } @@ -98,6 +101,9 @@ export class TechInsightsClient implements TechInsightsApi { return this.api('/checks/run', { method: 'POST', body: JSON.stringify(requestBody), + headers: { + 'content-type': 'application/json', + }, }); }