Skip to content

Commit 1e2626e

Browse files
committed
Ability to set the connect timeout from config
1 parent 668e781 commit 1e2626e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

config/hubspot.php

+1
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,6 @@
6565

6666
'http' => [
6767
'timeout' => env('HUBSPOT_HTTP_TIMEOUT', 10),
68+
'connect_timeout' => env('HUBSPOT_HTTP_CONNECT_TIMEOUT', 10),
6869
],
6970
];

src/Api/Client.php

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function prefix($uri): string
3232
public function http(): PendingRequest
3333
{
3434
return Http::timeout(config('hubspot.http.timeout', 10))
35+
->connectTimeout(config('hubspot.http.connect_timeout', 10))
3536
->withToken($this->accessToken)
3637
->throw(function (Response $response, RequestException $exception) {
3738
if ($response->json('category') === 'RATE_LIMITS') {

0 commit comments

Comments
 (0)