client User-Agent property

master
John Montagu, the 4th Earl of Sandvich 2023-10-25 16:39:00 -07:00
parent ec8192531d
commit 833fb42827
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@ export class Client {
public auth?: string; public auth?: string;
public agent: string = "pecans";
public get messages(): MessagesModule { public get messages(): MessagesModule {
return this.#messages; return this.#messages;
} }
@ -75,7 +77,7 @@ export class Client {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"Cookie": "twocansandstring_com_auth2=" + this.auth, "Cookie": "twocansandstring_com_auth2=" + this.auth,
"User-Agent": "pecans", "User-Agent": this.agent,
}, },
body: JSON.stringify(body), body: JSON.stringify(body),
}; };