© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2w ago•
12 replies
Bart

pg_net http post request fails with numeric IP address

🟢SQL
When running below SQL code on Supabase cloud using the domain of the Postman Echo (commented line) server, it works (i.e. I see the Postman Echo response in the _http_response table.
But it fails, i.e. I get a timeout in _http_response showing the server was never reached, when I change to use the IP address instead (code as shown). Note that I have a Host header to make it work with numeric IP. And I know that works since when I do the same call from the Postman app on my local Mac with numeric IP, it works. I was trying to reach my own server with numeric IP and that failed as well with timeout response, while that one works from local Postman app as well. What is wrong? Do somehow outbound http calls to numeric IP not go out of Supabase cloud? In all cases the http_request_queue table is empty showing the requests should have been sent. Help appreciated; you can easily replicate below in the SQL editor of your own Supabase project. I'm on Postgres 17, http 1.6, pg_net 0.19.5
select
net.http_post(
  --url:='https://postman-echo.com/post',
  url:='https://162.159.142.41/post',
  headers := '{"Content-Type":"application/json", "Host":"postman-echo.com"}'::jsonb,
  body:='{"hello": "world"}'::jsonb,
  timeout_milliseconds := 10000
) as request_id;
select
net.http_post(
  --url:='https://postman-echo.com/post',
  url:='https://162.159.142.41/post',
  headers := '{"Content-Type":"application/json", "Host":"postman-echo.com"}'::jsonb,
  body:='{"hello": "world"}'::jsonb,
  timeout_milliseconds := 10000
) as request_id;
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Get Current Project URL in PG_NET http_post?
SupabaseSSupabase / help-and-questions
3y ago
(pg_net) net._http_response has no records when I make a request.
SupabaseSSupabase / help-and-questions
8mo ago
Getting IP Address
SupabaseSSupabase / help-and-questions
4y ago
net.http_post permission denied in trigger
SupabaseSSupabase / help-and-questions
4y ago