Open mav2287 opened 4 years ago
Yes, you're right, the default behavior needs content-type header in the response. You can use the Negotiation middleware for that.
But you can create your own error response without check it, just have to implement the ResponderInterface and returning true
for the isValid()
method. And maybe there could be a generic responder to be used as fallback if not valid content type has found.
Went to use this without knowing there had to be a Content-type negotiation. Had to go into the source to figure that out. Might be something use to add into the docs since it won't work out of the box without it.