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

Send content-type header with body #1

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Conversation

art0007i
Copy link
Contributor

Inside of lib.rs the body function has a comment above it that says "Creates a JSON body" which I think means that it should also send the correct content type header.

I've looked at how reqwest handles this, and they have a dedicated json function inside of the RequestBuilder which does automatically add the content type header.

@ljoonal ljoonal self-requested a review September 18, 2023 14:57
@ljoonal
Copy link
Member

ljoonal commented Sep 18, 2023

I guess this would work, but I'm still not completely sure I'd want this to be so hard to override. I'd much prefer that the client implementations just define the default headers with reqwest when creating the client, so that any request could be overridden for them.... but then currently there is no easy way to provide such overrides anyways... So guess that can always change it later before the 1.0 release

@ljoonal ljoonal merged commit 415d3ec into onlivfe:main Sep 18, 2023
6 of 7 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.

2 participants