Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow http DELETE #63

Closed
psteinroe opened this issue Apr 11, 2022 · 4 comments · Fixed by #81
Closed

Allow http DELETE #63

psteinroe opened this issue Apr 11, 2022 · 4 comments · Fixed by #81
Labels
enhancement New feature or request

Comments

@psteinroe
Copy link

Feature request

Is your feature request related to a problem? Please describe.

We want to send a delete request to a serverless function within a Nextjs api to trigger the deletion of the entity at an external provider after it was deleted in our database.

Describe the solution you'd like

Support http delete in addition to post and get.

Describe alternatives you've considered

Adding another endpoint, e.g. /delete, and sending a post request there

@psteinroe psteinroe added the enhancement New feature or request label Apr 11, 2022
@tvogel
Copy link

tvogel commented Jan 11, 2023

See also #77 . Lack of DELETE makes it impossible to use pg_net to clean up supabase storage objects in UPDATE/DELETE Postgres triggers. Or am I missing something?

@steve-chavez
Copy link
Member

Can be used on v0.7 as:

        select net.http_delete(
            url:='https://httpbin.org/delete'
        ,   params:= '{"param-foo": "bar"}'
        ,   headers:= '{"X-Baz": "foo"}'
        );

This will be deployed to Supabase soon.

@GaryAustin1
Copy link

Is body also supported in delete? I have a delete storage task that uses bulk delete with the http extension right now. It uses body for pathnames. I don't really need to wait for a response in what I'm doing and pg_net would be ideal.

@steve-chavez
Copy link
Member

@GaryAustin1 Not supported, will track it on #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants