Skip to content

Commit

Permalink
js: Move user agent out into a module level const
Browse files Browse the repository at this point in the history
  • Loading branch information
svix-jplatte committed Jan 29, 2025
1 parent d5ac06b commit 6785bf9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion javascript/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ApiException } from "./util";
import { HttpErrorOut, HTTPValidationError } from "./openapi";

const LIB_VERSION = "1.56.0";
const USER_AGENT = `svix-libs/${LIB_VERSION}/javascript`;

export enum HttpMethod {
GET = "GET",
Expand Down Expand Up @@ -113,7 +114,7 @@ export class SvixRequest {
body,
headers: {
accept: "application/json, */*;q=0.8",
"user-agent": `svix-libs/${LIB_VERSION}/javascript`,
"user-agent": USER_AGENT,
"svix-req-id": randomId.toString(),
...this.headerParams,
},
Expand Down

0 comments on commit 6785bf9

Please sign in to comment.