mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-25 22:01:12 +00:00
Adding a set header function.
This commit is contained in:
parent
e91444a611
commit
576b4b85d9
1 changed files with 7 additions and 0 deletions
|
@ -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<BodyType extends object>(p: BodyType): string {
|
||||
|
|
Loading…
Reference in a new issue