From f4858605b69ae76f0b7050fba8f1fb55a8046246 Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Wed, 26 Oct 2022 05:41:23 +1100 Subject: [PATCH 1/2] Add a suggestion on using HTTP Methods --- apps/reference/docs/guides/functions.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/reference/docs/guides/functions.mdx b/apps/reference/docs/guides/functions.mdx index 0391adce248..e7446f70d3e 100644 --- a/apps/reference/docs/guides/functions.mdx +++ b/apps/reference/docs/guides/functions.mdx @@ -263,6 +263,10 @@ serve(async (req) => { }) ``` +### Using HTTP Methods + +Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE` and `OPTIONS`. A function can be designed to perform different actions based on request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your function. + ## Limitations - Deno Deploy limitations @@ -270,5 +274,4 @@ serve(async (req) => { - Cannot write to File System - Edge Functions - Local development - only one function at a time - - Supabase Functions only supports `POST`, `OPTIONS`, and `GET` requests. - Serving of HTML content is not supported (`GET` requests that return `text/html` will be rewritten to `text/plain`). From 00ead8d279b5531dbcd87c3ddab0dc11645a011c Mon Sep 17 00:00:00 2001 From: Lakshan Perera Date: Wed, 26 Oct 2022 07:45:51 +1100 Subject: [PATCH 2/2] Update apps/reference/docs/guides/functions.mdx Co-authored-by: dng --- apps/reference/docs/guides/functions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/reference/docs/guides/functions.mdx b/apps/reference/docs/guides/functions.mdx index e7446f70d3e..8bcab320554 100644 --- a/apps/reference/docs/guides/functions.mdx +++ b/apps/reference/docs/guides/functions.mdx @@ -265,7 +265,7 @@ serve(async (req) => { ### Using HTTP Methods -Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE` and `OPTIONS`. A function can be designed to perform different actions based on request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your function. +Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS`. A function can be designed to perform different actions based on a request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your function. ## Limitations