Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

improve wording in specs

Rodrigo Mansueli Nunesece1131769eb
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()