Fix HTTPRequestOptions at HTTPClient::post()
This commit is contained in:
parent
0cafa871f1
commit
2054a787da
|
@ -185,14 +185,14 @@ class HTTPClient implements IHTTPClient
|
|||
{
|
||||
$opts = [];
|
||||
|
||||
$opts[RequestOptions::BODY] = $params;
|
||||
$opts[HTTPRequestOptions::BODY] = $params;
|
||||
|
||||
if (!empty($headers)) {
|
||||
$opts[RequestOptions::HEADERS] = $headers;
|
||||
$opts[HTTPRequestOptions::HEADERS] = $headers;
|
||||
}
|
||||
|
||||
if (!empty($timeout)) {
|
||||
$opts[RequestOptions::TIMEOUT] = $timeout;
|
||||
$opts[HTTPRequestOptions::TIMEOUT] = $timeout;
|
||||
}
|
||||
|
||||
return $this->request('post', $url, $opts);
|
||||
|
|
Loading…
Reference in a new issue