From 576b4b85d904daf699ba891cd49d05f23c4dd7bf Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 18 Sep 2023 18:46:53 -0400 Subject: [PATCH 1/2] Adding a set header function. --- src/http.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/http.ts b/src/http.ts index dd21d4a..16086f7 100644 --- a/src/http.ts +++ b/src/http.ts @@ -1359,6 +1359,13 @@ export class LemmyHttp { return json; } } + + /** + * Set the headers (can be used to set the auth header) + */ + setHeaders(headers: { [key: string]: string }) { + this.#headers = headers; + } } function encodeGetParams(p: BodyType): string { From 5718cc5c93ccea38fe9c256611e406fd9444502e Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 18 Sep 2023 18:47:31 -0400 Subject: [PATCH 2/2] v0.19.0-rc.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 994e123..6e9b104 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lemmy-js-client", - "version": "0.19.0-rc.7", + "version": "0.19.0-rc.9", "description": "A javascript / typescript client for Lemmy", "repository": "https://github.com/LemmyNet/lemmy-js-client", "license": "AGPL-3.0",