mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 20:31:12 +00:00
Merge pull request #185 from LemmyNet/add_set_header_func
Add set header func
This commit is contained in:
commit
e2c87b2dc6
2 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "lemmy-js-client",
|
"name": "lemmy-js-client",
|
||||||
"version": "0.19.0-rc.7",
|
"version": "0.19.0-rc.9",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
|
|
@ -1359,6 +1359,13 @@ export class LemmyHttp {
|
||||||
return json;
|
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 {
|
function encodeGetParams<BodyType extends object>(p: BodyType): string {
|
||||||
|
|
Loading…
Reference in a new issue