File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ Added config in you're .env file and config/services.php
1515config/services.php
1616
1717 'prepr' => [
18- 'endpoint' => env('PREPR_ENDPOINT')
18+ 'endpoint' => env('PREPR_ENDPOINT'),
19+ 'timeout' => env('PREPR_TIMEOUT'),
20+ 'connect_timeout' => env('PREPR_CONNECT_TIMEOUT')
1921 ]
2022```
2123
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ public function boot()
3939 $ json ['variables ' ] = data_get ($ data ,'variables ' );
4040 }
4141
42- return Http::acceptJson ()->withHeaders ($ headers )->post (config ('services.prepr.endpoint ' ), $ json );
42+ return Http::acceptJson ()
43+ ->timeout (config ('services.prepr.timeout ' ,30 ))
44+ ->connectTimeout (config ('services.prepr.connect_timeout ' ,10 ))
45+ ->withHeaders ($ headers )
46+ ->post (config ('services.prepr.endpoint ' ), $ json );
4347
4448 });
4549 }
You can’t perform that action at this time.
0 commit comments