I need to send a request to a restful api from Supabase postgreSQL database using http_post function, sending an urlencoded form in body.
I found no specific documentation on supabase: https://supabase.com/docs/guides/database/extensions/http
My specific need is to send this request using supabase http_post extension, to get an access token from microsoft (in Curl to show the parameters I need to encode as x-www-form-urlencoded:
curl --location 'https://login.microsoftonline.com/<my tentant id>/oauth2/v2.0/token'\
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<my app client id>' \
--data-urlencode 'scope=api://<my scope>/.default' \
--data-urlencode 'client_secret=<my client Id secret' \
--data-urlencode 'grant_type=client_credentials'