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

Support */* for EncodingNegotiator #105

Open
TiMESPLiNTER opened this issue Apr 6, 2020 · 1 comment
Open

Support */* for EncodingNegotiator #105

TiMESPLiNTER opened this issue Apr 6, 2020 · 1 comment

Comments

@TiMESPLiNTER
Copy link

TiMESPLiNTER commented Apr 6, 2020

Currently passing in an accept header equals */* does not work. It tells that there's no match and EncodingNegotiator::getBest() returns null instead it should return the highest prioritized available content type.

$negotiator = new EncodingNegotiator();
$mediaType = $negotiator->getBest('*/*', ['application/json']);
var_dump($mediaType); // -> null, but should be 'application/json'
@willdurand
Copy link
Owner

willdurand commented Jan 30, 2022

Hey, could you please write a test case and submit a PR to start a conversation around this issue? Thanks!

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

No branches or pull requests

2 participants