© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Drew

Add Authorization Header to http_post

I'm trying to follow the make a query that triggers one of my edge functions, which requires me to include a header in the HTTP request. The tutorial shows the following format:
  "status", "content"::jsonb
from
  http_post(
    'https://jsonplaceholder.typicode.com/posts',
    '{ "title": "foo", "body": "bar", "userId": 1 }',
    'application/json'
  );
  "status", "content"::jsonb
from
  http_post(
    'https://jsonplaceholder.typicode.com/posts',
    '{ "title": "foo", "body": "bar", "userId": 1 }',
    'application/json'
  );


How do I add an authorization header to this? I checked in the repo for pg-sql-http and the only mention of an authorization header is with a get request, and I don't see any mentions of headers at all with post requests.

Thanks!
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

edge functions missing authorization header
SupabaseSSupabase / help-and-questions
2w ago
how to pass Authorization Bearer when use pgsql-http extension
SupabaseSSupabase / help-and-questions
4y ago
pgsql-http to GET and POST an image
SupabaseSSupabase / help-and-questions
4y ago
http_post not working while http_get is fine
SupabaseSSupabase / help-and-questions
4y ago