Hey! :wave: I think the SDK is missing a usecase ...
# supabase-kt
n
Hey! 👋 I think the SDK is missing a usecase for Functions. There isn’t the possibility to change the HTTP Method and it’s always
POST
, right? The JS SDK has a
method
property in
invoke
: https://supabase.com/docs/reference/javascript/functions-invoke. This is needed in case the edge function has some routing inside.
j
The default method is
POST
yes, but as you can provide a whole
HttpRequestBuilder
, you can just override the method:
Copy code
supabase.functions.invoke("test") {
    method = HttpMethod.Delete
}
n
Ah, I didn’t know that would work given that it’s using
<http://api.post|api.post>
, thanks!
j
Yes, basically everything within this block overrides the default request parameters. That's why I didn't add parameters for things like
method
or custom content types as you have the most freedom with the Ktor request builder.
👍 1
n
That’s great, thank you 🙇