Fix HTTPRequestOptions at HTTPClient::post()
This commit is contained in:
parent
0cafa871f1
commit
2054a787da
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue