Skip to content

makes possible to invoke get or post requests #4

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

douglaspetrin
Copy link

What kind of change does this PR introduce?

This PR introduces a key feature and a docs update, enabling distinct GET and POST requests when invoking Supabase functions.

What is the current behavior?

Previously, the library had limited or unclear support for specifying GET vs. POST methods for function invocation.

What is the new behavior?

The Invoke method now explicitly supports both "GET" and "POST" HTTP methods:

  • POST requests: Send a JSON body by providing a payload.
  • GET requests: Send query parameters by providing a map, or no parameters if the payload is nil.
  • The README.md has been comprehensively updated with clear examples and instructions for these new capabilities, including client initialization, making different types of requests, and response handling.

Additional context

These changes enhance the client's flexibility for interacting with Supabase Edge Functions and provide users with clear documentation on how to leverage these common HTTP methods.

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

Successfully merging this pull request may close these issues.

1 participant