Negotiation
Negotiation copied to clipboard
Support */* for EncodingNegotiator
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'
Hey, could you please write a test case and submit a PR to start a conversation around this issue? Thanks!