Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set header func #185

Merged
merged 2 commits into from
Sep 18, 2023
Merged

Add set header func #185

merged 2 commits into from
Sep 18, 2023

Conversation

dessalines
Copy link
Member

No description provided.

@dessalines dessalines marked this pull request as ready for review September 18, 2023 22:48
Comment on lines +1363 to +1368
/**
* Set the headers (can be used to set the auth header)
*/
setHeaders(headers: { [key: string]: string }) {
this.#headers = headers;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should consumers of the client also be able to pass headers for individual requests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a case at least. But this one seems useful, because a common case is to Login, then set the auth header ( This might not be necessary in browsers where it should pass the cookie, but in other clients its seems useful).

@SleeplessOne1917 SleeplessOne1917 merged commit e2c87b2 into main Sep 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants