Open ignasi35 opened 7 years ago
This is because withBody
also sets the content type, and there were issues with content-type being set out of order.
So the original rationale was repeated content types:
And then there's been reworking of the logic when handling typed bodies with content types.
When the body of a request is set the
Content-Type
header is derived from the actual payload. Once set, theContent-Type
can't be overriden.See https://github.com/playframework/play-ws/commit/b7059c90a504335723c8e7c6621ffece2b792fa1#diff-4314f1bc7ecca562239ccbdaf002c36cR77
This is preventing advanced users from managing the serialization themselves, then provide (e.g.) a
ByteString
and finally set the theContent-Type
manually. That is the case of Lagom.