Fix HTTPRequestOptions at HTTPClient::post()

This commit is contained in:
Philipp 2021-08-25 21:23:46 +02:00
parent 0cafa871f1
commit 2054a787da
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD

View file

@ -185,14 +185,14 @@ class HTTPClient implements IHTTPClient
{ {
$opts = []; $opts = [];
$opts[RequestOptions::BODY] = $params; $opts[HTTPRequestOptions::BODY] = $params;
if (!empty($headers)) { if (!empty($headers)) {
$opts[RequestOptions::HEADERS] = $headers; $opts[HTTPRequestOptions::HEADERS] = $headers;
} }
if (!empty($timeout)) { if (!empty($timeout)) {
$opts[RequestOptions::TIMEOUT] = $timeout; $opts[HTTPRequestOptions::TIMEOUT] = $timeout;
} }
return $this->request('post', $url, $opts); return $this->request('post', $url, $opts);