Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update pgnet.mdx

dng3da15f7204c3
diff --git a/apps/docs/pages/guides/database/extensions/pgnet.mdx b/apps/docs/pages/guides/database/extensions/pgnet.mdx
index afaa24a8378..d652be96ad8 100644
--- a/apps/docs/pages/guides/database/extensions/pgnet.mdx
+++ b/apps/docs/pages/guides/database/extensions/pgnet.mdx
@@ -150,102 +150,6 @@ request_id
After triggering `http_post`, use [`http_get_result`](#http_get_result) to get the result of the request.
-## `http_collect_response` [#http_collect_response]
-
-Given a `request_id` reference, retrieves the response.
-
-When `async:=false` is set it is recommended that [statement_timeout](https://www.postgresql.org/docs/13/runtime-config-client.html) is set for the maximum amount of time the caller is willing to wait in case the response is slow to populate.
-
-### Signature
-
-<Admonition type="caution">
-
-This is a Postgres SECURITY DEFINER function
-
-</Admonition>
-
-```sql
-net.http_collect_response(
- -- request_id reference
- request_id bigint,
- -- when `true`, return immediately. when `false` wait for the request to complete before returning
- async bool default true
-)
- -- http response composite wrapped in a result type
- returns net.http_response_result
-
- strict
- volatile
- parallel safe
-```
-
-### Usage
-
-<Admonition type="caution">
-
-`net.http_collect_response` must be in a separate transaction from the calls to `net.http_<method>`
-
-</Admonition>
-
-```sql
-select
- net.http_post(
- url:='https://httpbin.org/post',
- body:='{"hello": "world"}'::jsonb
- ) as request_id;
-request_id
-----------
- 1
-(1 row)
-
-select * from net.http_collect_response(1, async:=false);
-status | message | response
---------+---------+----------
-SUCCESS ok (
- status_code := 200,
- headers := '{"date": ...}',
- body := '{"args": ...}'
- )::net.http_response_result
-
-
-select
- (response).body::json
-from
- net.http_collect_response(request_id:=1);
- body
--------------------------------------------------------------------
- {
- "args": {},
- "data": "{\"hello\": \"world\"}",
- "files": {},
- "form": {},
- "headers": {
- "Accept": "*/*",
- "Content-Length": "18",
- "Content-Type": "application/json",
- "Host": "httpbin.org",
- "User-Agent": "pg_net/0.2",
- "X-Amzn-Trace-Id": "Root=1-61031a5c-7e1afeae69bffa8614d8e48e"
- },
- "json": {
- "hello": "world"
- },
- "origin": "135.63.38.488",
- "url": "https://httpbin.org/post"
- }
-(1 row)
-```
-
-Where `response` is a composite:
-
-```sql
-status_code integer
-headers jsonb
-body text
-```
-
-Possible values for `net.http_response_result.status` are `('PENDING', 'SUCCESS', 'ERROR')`
-
## Resources
- Source code: [github.com/supabase/pg_net](https://github.com/supabase/pg_net/)