Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #36839 [BrowserKit] Raw body with custom Content-Type header (azh…
…urb) This PR was squashed before being merged into the 4.4 branch. Discussion ---------- [BrowserKit] Raw body with custom Content-Type header | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | License | MIT Currently, if you try to send POST/PUT request with custom `Content-Type` header and specified body, the real request will contain `text/plain` content type. Following code ```php $client->request( 'POST', '/url', [], [], [ 'CONTENT_TYPE' => 'application/json' ], '{"foo":"bar"}' ); ``` produces next request ``` POST / Content-Type: text/plain; charset=utf-8 {"foo":"bar"} ``` With this fix, the request will be ``` POST / Content-Type: application/json {"foo":"bar"} ``` Commits ------- d2dd92b [BrowserKit] Raw body with custom Content-Type header
- Loading branch information