From ece1131769eb8ca10561c0357d8e4fa5357beb25 Mon Sep 17 00:00:00 2001 From: Rodrigo Mansueli Nunes Date: Fri, 30 Jun 2023 10:59:31 -0300 Subject: [PATCH] improve wording in specs --- spec/supabase_js_v1.yml | 4 ++-- spec/supabase_js_v2.yml | 31 ++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/spec/supabase_js_v1.yml b/spec/supabase_js_v1.yml index d4a43a60efe..610839264df 100644 --- a/spec/supabase_js_v1.yml +++ b/spec/supabase_js_v1.yml @@ -707,7 +707,7 @@ functions: - id: invoke title: 'invoke()' description: | - Invokes a Supabase Function. + Invokes a Supabase Edge Function. $ref: '@supabase/functions-js.FunctionsClient.invoke' notes: | - Requires an Authorization header. @@ -736,7 +736,7 @@ functions: - id: passing-custom-headers name: Passing custom headers. description: | - You can pass custom headers to your function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT. + You can pass custom headers to your Edge Function. Note: supabase-js automatically passes the `Authorization` header with the signed in user's JWT. isSpotlight: true code: | ```js diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml index bc497746e44..7c05933ffeb 100644 --- a/spec/supabase_js_v2.yml +++ b/spec/supabase_js_v2.yml @@ -4273,7 +4273,7 @@ functions: - id: invoke title: invoke() description: | - Invoke a Supabase Function. + Invoke a Supabase Edge Function. $ref: '@supabase/functions-js.FunctionsClient.invoke' notes: | - Requires an Authorization header. @@ -4329,6 +4329,35 @@ functions: body: { foo: 'bar' } }) ``` + - id: calling-with-delete-verb + name: Calling with DELETE HTTP verb + description: | + You can also set the HTTP verb to `DELETE` when calling your Edge Function. + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + body: { foo: 'bar' }, + method: 'DELETE' + }) + ``` + - id: calling-with-get-verb + name: Calling with GET HTTP verb + description: | + You can also set the HTTP verb to `GET` when calling your Edge Function. + isSpotlight: true + code: | + ```js + const { data, error } = await supabase.functions.invoke('hello', { + headers: { + "my-custom-header": 'my-custom-header-value' + }, + method: 'GET' + }) + ``` - id: subscribe title: on().subscribe()