Skip to content

Commit

Permalink
Merge branch 'master' into test-8-4
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric authored Nov 5, 2024
2 parents a17c609 + 93f0673 commit 936c3a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function sendRequest(Request $request, Options $options): Response
curl_setopt($curlHandle, \CURLOPT_URL, $dsn->getEnvelopeApiEndpointUrl());
curl_setopt($curlHandle, \CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($curlHandle, \CURLOPT_USERAGENT, $this->sdkIdentifier . '/' . $this->sdkVersion);
curl_setopt($curlHandle, \CURLOPT_TIMEOUT, $options->getHttpTimeout());
curl_setopt($curlHandle, \CURLOPT_CONNECTTIMEOUT, $options->getHttpConnectTimeout());
curl_setopt($curlHandle, \CURLOPT_TIMEOUT_MS, $options->getHttpTimeout() * 1000);
curl_setopt($curlHandle, \CURLOPT_CONNECTTIMEOUT_MS, $options->getHttpConnectTimeout() * 1000);
curl_setopt($curlHandle, \CURLOPT_ENCODING, '');
curl_setopt($curlHandle, \CURLOPT_POST, true);
curl_setopt($curlHandle, \CURLOPT_POSTFIELDS, $requestData);
Expand Down
14 changes: 14 additions & 0 deletions tests/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ static function (): void {},
'setHttpTimeout',
];

yield [
'http_timeout',
0.2,
'getHttpTimeout',
'setHttpTimeout',
];

yield [
'http_connect_timeout',
1,
Expand All @@ -355,6 +362,13 @@ static function (): void {},
'setHttpConnectTimeout',
];

yield [
'http_connect_timeout',
0.2,
'getHttpConnectTimeout',
'setHttpConnectTimeout',
];

yield [
'http_ssl_verify_peer',
false,
Expand Down

0 comments on commit 936c3a6

Please sign in to comment.