File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -175,3 +175,17 @@ SELECT status FROM http_get('http://httpbin.org/status/555');
175
175
555
176
176
(1 row)
177
177
178
+ -- Alter the default timeout and then run a query that is longer than
179
+ -- the default (5s), but shorter than the new timeout
180
+ SELECT http_set_curlopt('CURLOPT_TIMEOUT_MS', '10000');
181
+ http_set_curlopt
182
+ ------------------
183
+ t
184
+ (1 row)
185
+
186
+ SELECT status FROM http_get('http://httpstat.us/200?sleep=7000');
187
+ status
188
+ --------
189
+ 200
190
+ (1 row)
191
+
Original file line number Diff line number Diff line change @@ -100,3 +100,7 @@ SELECT http_reset_curlopt();
100
100
-- Now it should work
101
101
SELECT status FROM http_get(' http://httpbin.org/status/555' );
102
102
103
+ -- Alter the default timeout and then run a query that is longer than
104
+ -- the default (5s), but shorter than the new timeout
105
+ SELECT http_set_curlopt(' CURLOPT_TIMEOUT_MS' , ' 10000' );
106
+ SELECT status FROM http_get(' http://httpstat.us/200?sleep=7000' );
You can’t perform that action at this time.
0 commit comments