Skip to content

Commit

Permalink
feat: not adding user-agent for curl requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun0157 committed Jun 16, 2024
1 parent b12c19b commit 6572c2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reformatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6572c2c

Please sign in to comment.