Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

fix: don't set the Accept header by default #293

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dunglas
Copy link
Contributor

@dunglas dunglas commented Oct 26, 2020

This is a workaround for symfony/symfony#33393.

Currently, because of a limitation in Symfony, a default Accept HTTP header is always set to text/html. This is annoying when testing an API: it's a legit testing use case to ensure that the API behaves properly if this header isn't passed. Until recently, it was possible to use a hack to remove this header (for instance, in API Platform: https://github.com/api-platform/core/blob/master/features/bootstrap/HttpHeaderContext.php#L32), but it doesn't work anymore because Symfony now enforces type parameters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant