Adding a set header function.

This commit is contained in:
Dessalines 2023-09-18 18:46:53 -04:00
parent e91444a611
commit 576b4b85d9

View file

@ -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 {