Skip to content

Commit 576b4b8

Browse files
committed
Adding a set header function.
1 parent e91444a commit 576b4b8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/http.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,13 @@ export class LemmyHttp {
13591359
return json;
13601360
}
13611361
}
1362+
1363+
/**
1364+
* Set the headers (can be used to set the auth header)
1365+
*/
1366+
setHeaders(headers: { [key: string]: string }) {
1367+
this.#headers = headers;
1368+
}
13621369
}
13631370

13641371
function encodeGetParams<BodyType extends object>(p: BodyType): string {

0 commit comments

Comments
 (0)