improve wording in specs

This commit is contained in:
Rodrigo Mansueli Nunes committed 2023-06-30 10:59:31 -03:00
1 parent 2ab9c4ba12
commit ece1131769
2 files changed
+32 -3

No files matched your search

+2 -2
View File
@@ -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
+30 -1
View File
@@ -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()