mtarld / api-platform-ms-bundle

A set of tools to use Api Platform in a microservice context
MIT License
66 stars 8 forks source link

Wrong Accept header for patch requests #84

Closed Rainrider closed 1 year ago

Rainrider commented 1 year ago

Content-Type and Accept headers are set to the same value for every request (see GenericHttpClient::request). However the response to a PATCH request is in the default format (like application/ld+json) and not application/merge-patch+json. Combined this leads to a 406 status code error when the default format is not jsonapi.

The solution to this would be to use the default mime type set up for the microservice for the accept header. I could issue a PR if you don't mind.