Skip to content

FunctionsClient.invoke not carrying body content #97

Open
@sundaywork

Description

@sundaywork

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The js call to invoke an edge function didn't send body in the request. This has caused me a lot of time to debug. I found this link https://github.com/orgs/supabase/discussions/19148 has reported the issue and it seems not being fixed. Used raw fetching did the work.

Evidence: the content length is 0.

Image

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

const headers = await this.getAuthHeaders();
            
const { data, error } = await supabase.functions.invoke(functionName, {
    body,
    headers
});

The body was somehow not placed into the request.

Expected behavior

The body should carry the json object to the server.

Screenshots

See above. Tested both on Chrome and Edge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions