Skip to content

docs: document function invocation URL for browser-side calls #13

@MajorTal

Description

@MajorTal

Problem

The URL pattern for calling edge functions from browser JS (https://api.run402.com/functions/v1/<name>) isn't documented in llms-cli.txt. Had to infer it from the deploy response. The docs only show CLI invocation via run402 functions invoke.

Suggested Solution

Add a "Calling functions from the browser" example to the functions section:

const res = await fetch('https://api.run402.com/functions/v1/my-function', {
  method: 'POST',
  headers: { apikey: ANON_KEY, Authorization: 'Bearer ' + accessToken, 'Content-Type': 'application/json' },
  body: JSON.stringify({ key: 'value' }),
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationfeedback:wild-lycheeFeedback from Wild Lychee build

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions