Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’3y agoβ€’
4 replies
gduteaud

Cannot POST error on hello world edge function

Hello all,
I created the most basic edge function using
supabase functions new hello-world
supabase functions new hello-world
and deployed it to my project. I can see it in the project dashboard. But when I try to invoke it using the provided CLI command, I get this:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /functions/v1/hello-world</pre>
</body>
</html>

The body of the function is simply:
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"

console.log("Hello from Functions!")

Deno.serve(async (req) => {
  const { name } = await req.json()
  const data = {
    message: `Hello ${name}!`,
  }

  return new Response(
    JSON.stringify(data),
    { headers: { "Content-Type": "application/json" } },
  )
})
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"

console.log("Hello from Functions!")

Deno.serve(async (req) => {
  const { name } = await req.json()
  const data = {
    message: `Hello ${name}!`,
  }

  return new Response(
    JSON.stringify(data),
    { headers: { "Content-Type": "application/json" } },
  )
})


Can't figure out what I'm doing wrong with this very simple example, can anyone help? Thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Help with edge function hello-world
SupabaseSSupabase / help-and-questions
3y ago
Cannot deploy Edge Function
SupabaseSSupabase / help-and-questions
3mo ago
Cannot download edge function
SupabaseSSupabase / help-and-questions
3y ago
Error on deploying edge function:
SupabaseSSupabase / help-and-questions
4mo ago