SupabaseS
Supabase4y ago
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'
  );


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!
Was this page helpful?