@@ -20,7 +20,6 @@ net.http_get(
20
20
params jsonb default ' {}' ::jsonb,
21
21
-- key/values to be included in request headers
22
22
headers jsonb default ' {}' ::jsonb,
23
- -- WARNING: this is currently ignored, so there is no timeout
24
23
-- the maximum number of milliseconds the request may take before being cancelled
25
24
timeout_milliseconds int default 1000
26
25
)
@@ -67,7 +66,6 @@ net.http_post(
67
66
params jsonb default ' {}' ::jsonb,
68
67
-- key/values to be included in request headers
69
68
headers jsonb default ' {"Content-Type": "application/json"}' ::jsonb,
70
- -- WARNING: this is currently ignored, so there is no timeout
71
69
-- the maximum number of milliseconds the request may take before being cancelled
72
70
timeout_milliseconds int default 1000
73
71
)
@@ -91,3 +89,52 @@ request_id
91
89
1
92
90
(1 row)
93
91
```
92
+
93
+ ### net.http_delete
94
+
95
+ ##### description
96
+ Create an HTTP DELETE request, returning the request's id
97
+
98
+ !!! note
99
+ HTTP requests are not started until the transaction is committed
100
+
101
+ !!! note
102
+ the body's character set encoding matches the database's ` server_encoding ` setting
103
+
104
+ !!! note
105
+ this is a Postgres SECURITY DEFINER function
106
+
107
+ ##### signature
108
+
109
+ ``` sql
110
+ net .http_delete (
111
+ -- url for the request
112
+ url text ,
113
+ -- key/value pairs to be url encoded and appended to the `url`
114
+ params jsonb default ' {}' ::jsonb,
115
+ -- key/values to be included in request headers
116
+ headers jsonb default ' {}' ::jsonb,
117
+ -- the maximum number of milliseconds the request may take before being cancelled
118
+ timeout_milliseconds int default 2000
119
+ )
120
+ -- request_id reference
121
+ returns bigint
122
+
123
+ strict
124
+ volatile
125
+ parallel safe
126
+ language plpgsql
127
+ security definer
128
+ ```
129
+
130
+ ##### usage
131
+ ``` sql
132
+ select
133
+ net .http_delete (
134
+ url:= ' https://dummy.restapiexample.com/api/v1/delete/2'
135
+ ) as request_id;
136
+ request_id
137
+ -- --------
138
+ 1
139
+ (1 row)
140
+ ```
0 commit comments