How to send post request with x-www-form-urlencoded body in supbase function?

payload := jsonb_build_array('name', row_record.id,
'email', row_record.contact_email)::TEXT;

-- Invoke the http_request function with the dynamic payload and auth header
PERFORM old_public.http(
('POST',
'https://api.stripe.com/v1/customers'::varchar,
ARRAY[old_public.http_header('Authorization','Bearer ' || bearer_token)],
'application/x-www-form-urlencoded',
payload)::old_public.http_request);
Was this page helpful?