contexts icon indicating copy to clipboard operation
contexts copied to clipboard

fix: don't set the Accept header by default

Open dunglas opened this issue 5 years ago • 0 comments

This is a workaround for https://github.com/symfony/symfony/issues/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.

dunglas avatar Oct 26 '20 13:10 dunglas