From 9ac6aed4cdd1eaa532cfaa453037f8d8b28a6194 Mon Sep 17 00:00:00 2001 From: JhontSouth Date: Fri, 22 Dec 2023 09:40:57 -0500 Subject: [PATCH] include http method in fetch request --- .../botframework-connector/src/auth/botFrameworkClientImpl.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts b/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts index 69d743899b..616cbb0615 100644 --- a/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts +++ b/libraries/botframework-connector/src/auth/botFrameworkClientImpl.ts @@ -9,13 +9,15 @@ import { ServiceClientCredentialsFactory } from './serviceClientCredentialsFacto import { USER_AGENT } from './connectorFactoryImpl'; import { WebResource } from '@azure/core-http'; import { ok } from 'assert'; +import fetch from 'cross-fetch'; const botFrameworkClientFetchImpl: typeof fetch = async (input, init) => { const url = z.string().parse(input); const { body, headers } = z.object({ body: z.string(), headers: z.record(z.string()).optional() }).parse(init); const response = await fetch(url, { - body: JSON.parse(body), + method: 'POST', + body, headers, });