Skip to content
New issue

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

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

Already on GitHub? # to your account

Add 'Content-Type' header in IntoResponse #1

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

dav-wolff
Copy link
Contributor

Adds the appropriate 'Content-Type' header with value 'application/postcard' when generating a response in IntoResponse.

This makes sense as this crate already expects requests to include the Content-Type header, so it should also include it in its responses. This is also consistent with what axum's Json type does.
The documentation previously stated that the 'application/json' Content-Type was added to the response which was not the case. This is now updated.

I don't know if this crate is still being maintained, but it would be great to see this change on crates.io :)

@joseburgosguntin joseburgosguntin merged commit e13de89 into joseburgosguntin:main Sep 26, 2024
1 check passed
@joseburgosguntin
Copy link
Owner

joseburgosguntin commented Sep 26, 2024

@dav-wolff thanks for the help :), fixed the test so we don't need the extra dependencies
note: it's available on crates.io with v0.2.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants