@@ -14,7 +14,6 @@ create table net.http_request_queue(
14
14
url text not null ,
15
15
headers jsonb not null ,
16
16
body bytea ,
17
- timeout_milliseconds int not null ,
18
17
created timestamptz not null default now()
19
18
);
20
19
@@ -92,9 +91,7 @@ create or replace function net.http_get(
92
91
-- key/value pairs to be url encoded and appended to the `url`
93
92
params jsonb default ' {}' ::jsonb,
94
93
-- key/values to be included in request headers
95
- headers jsonb default ' {}' ::jsonb,
96
- -- the maximum number of milliseconds the request may take before being cancelled
97
- timeout_milliseconds int default 1000
94
+ headers jsonb default ' {}' ::jsonb
98
95
)
99
96
-- request_id reference
100
97
returns bigint
@@ -112,12 +109,11 @@ begin
112
109
from jsonb_each_text(params);
113
110
114
111
-- Add to the request queue
115
- insert into net .http_request_queue (method, url, headers, timeout_milliseconds )
112
+ insert into net .http_request_queue (method, url, headers)
116
113
values (
117
114
' GET' ,
118
115
net ._encode_url_with_params_array (url, params_array),
119
- headers,
120
- timeout_milliseconds
116
+ headers
121
117
)
122
118
returning id
123
119
into request_id;
@@ -136,9 +132,7 @@ create or replace function net.http_post(
136
132
-- key/value pairs to be url encoded and appended to the `url`
137
133
params jsonb default ' {}' ::jsonb,
138
134
-- key/values to be included in request headers
139
- headers jsonb default ' {"Content-Type": "application/json"}' ::jsonb,
140
- -- the maximum number of milliseconds the request may take before being cancelled
141
- timeout_milliseconds int DEFAULT 1000
135
+ headers jsonb default ' {"Content-Type": "application/json"}' ::jsonb
142
136
)
143
137
-- request_id reference
144
138
returns bigint
@@ -186,13 +180,12 @@ begin
186
180
jsonb_each_text(params);
187
181
188
182
-- Add to the request queue
189
- insert into net .http_request_queue (method, url, headers, body, timeout_milliseconds )
183
+ insert into net .http_request_queue (method, url, headers, body)
190
184
values (
191
185
' POST' ,
192
186
net ._encode_url_with_params_array (url, params_array),
193
187
headers,
194
- body::text ::bytea ,
195
- timeout_milliseconds
188
+ body::text ::bytea
196
189
)
197
190
returning id
198
191
into request_id;
0 commit comments