File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 5
5
- [ Request Data] ( #request-data )
6
6
- [ Headers] ( #headers )
7
7
- [ Authentication] ( #authentication )
8
+ - [ Timeout] ( #timeout )
8
9
- [ Retries] ( #retries )
9
10
- [ Error Handling] ( #error-handling )
10
11
- [ Guzzle Options] ( #guzzle-options )
@@ -110,6 +111,15 @@ If you would like to quickly add an `Authorization` bearer token header to the r
110
111
111
112
$response = Http::withToken('token')->post(...);
112
113
114
+ <a name =" timeout " ></a >
115
+ ### Timeout
116
+
117
+ The ` timeout ` method may be used to specify the maximum number of seconds to wait for a response:
118
+
119
+ $response = Http::timeout(3)->get(...);
120
+
121
+ If the given timeout is exceeded, an instance of ` Illuminate\Http\Client\ConnectionException ` will be thrown.
122
+
113
123
<a name =" retries " ></a >
114
124
### Retries
115
125
You can’t perform that action at this time.
0 commit comments