Skip to content

Make accept header json when it was wildcard #5

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

Closed
wants to merge 3 commits into from
Closed

Make accept header json when it was wildcard #5

wants to merge 3 commits into from

Conversation

gepbird
Copy link

@gepbird gepbird commented Oct 5, 2021

No description provided.

@gepbird gepbird requested a review from joskfg as a code owner October 5, 2021 22:08
@gepbird
Copy link
Author

gepbird commented Oct 5, 2021

When some applications send API requests (tested with Python's request module and Postman), they put a wildcard accept header(Accept: */*), not triggering this middleware. This PR makes it so every wildcard header gets converted into application/json.

@joskfg
Copy link
Contributor

joskfg commented Oct 7, 2021

Thanks for you PR. I was reviewing the Accept header options and it seems it can produce things like:

Accept: application/json

Accept: application/*

// General default
Accept: */*

So, Could you include application/*?

@gepbird
Copy link
Author

gepbird commented Oct 20, 2021

I made a commit for your suggestion, any updates?

@gepbird
Copy link
Author

gepbird commented Nov 2, 2021

Any updates?

@gepbird gepbird closed this by deleting the head repository Aug 22, 2023
@joskfg
Copy link
Contributor

joskfg commented Aug 28, 2023

Sorry @gepbird, I missed this. I think it is worth it to be added, so we will integrate the change. Thanks for your contribution.

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.

4 participants