protected $handler = null;
protected $sink = null;
+ /** @var array */
protected $guzzleOptions = [ 'http_errors' => false ];
/**
* @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
- * @param array $options (optional) extra params to pass (see Http::request())
+ * @param array $options (optional) extra params to pass (see HttpRequestFactory::create())
* @param string $caller The method making this request, for profiling
* @param Profiler|null $profiler An instance of the profiler for profiling, or null
* @throws Exception
$this->guzzleOptions['form_params'] = $postData;
} else {
$this->guzzleOptions['body'] = $postData;
+ // mimic CURLOPT_POST option
+ if ( !isset( $this->reqHeaders['Content-Type'] ) ) {
+ $this->reqHeaders['Content-Type'] = 'application/x-www-form-urlencoded';
+ }
}
// Suppress 'Expect: 100-continue' header, as some servers