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
15
15
config/services.php
16
16
17
17
'prepr' => [
18
- 'endpoint' => env('PREPR_ENDPOINT')
18
+ 'endpoint' => env('PREPR_ENDPOINT'),
19
+ 'timeout' => env('PREPR_TIMEOUT'),
20
+ 'connect_timeout' => env('PREPR_CONNECT_TIMEOUT')
19
21
]
20
22
```
21
23
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ public function boot()
39
39
$ json ['variables ' ] = data_get ($ data ,'variables ' );
40
40
}
41
41
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 );
43
47
44
48
});
45
49
}
You can’t perform that action at this time.
0 commit comments