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

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

Open
dunglas wants to merge 1 commit intoBehatch:masterfrom
dunglas:fix/symfony-33393
Open

fix: don't set the Accept header by default#293
dunglas wants to merge 1 commit intoBehatch:masterfrom
dunglas:fix/symfony-33393

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