Mimic CURLOPT_POST in GuzzleHttpRequest
authorMoritz Schubotz (physikerwelt) <wiki@physikerwelt.de>
Fri, 22 Nov 2019 15:11:26 +0000 (16:11 +0100)
committerPaladox <thomasmulhall410@yahoo.com>
Wed, 4 Dec 2019 16:28:48 +0000 (16:28 +0000)
commitff4d49a42e42fc2ac3e6b33b774fdad7a3e40d6f
treebecde93832288de7008d32fcb114884e8e44ef17
parent0f334b3b10b0f795ebeff83220afc9e22150db48
Mimic CURLOPT_POST in GuzzleHttpRequest

The MWHttpRequest is implemented by the
CurlHttpRequest class and also the
GuzzleHttpRequest class. However, curl based rendering set
the CURLOPT_POST which implies that the 'Content-Type'
header defaults to 'application/x-www-form-urlencoded'.
To homgonize the functionality this patch mimics the
curl behaviour in Guzzle.

Bug: T232866
Change-Id: Id60a8de18e5f1e750a3bde23bd8b0deca4071165
(cherry picked from commit 5e3a0e73955d6324c5dd6e12fbe36d3ba203d9db)
includes/http/GuzzleHttpRequest.php
tests/phpunit/includes/http/GuzzleHttpRequestTest.php