diff --git a/src/reformatRequest.ts b/src/reformatRequest.ts index 52576cc..85dd8df 100644 --- a/src/reformatRequest.ts +++ b/src/reformatRequest.ts @@ -36,7 +36,8 @@ function formatAndReplaceVars( curlReq?: boolean, ): string[] { const autoHeaders: { [key: string]: string } = {}; - autoHeaders["user-agent"] = "zzAPI-vscode/" + extensionVersion; + if (!curlReq) autoHeaders["user-agent"] = "zzAPI-vscode/" + extensionVersion; + if (request.httpRequest.body && typeof request.httpRequest.body == "object") autoHeaders["content-type"] = "application/json"; request.httpRequest.headers = Object.assign(autoHeaders, request.httpRequest.headers);