FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/ant-design / faas

Function: faas()

faas<Path>(action, params, options?): Promise<Response<FaasData<Path>>>

Call the currently configured FaasReactClient.

In Ant Design apps, import this helper from @faasjs/ant-design so failed requests use the same configured feedback behavior as the rest of the UI.

Type Parameters

Path

Path extends FaasActionPaths

Registered action path used to infer params and response data.

Parameters

action

Path

Action path to invoke.

params

FaasParams<Path>

Parameters sent to the action.

options?

Options

Optional per-request overrides such as headers or base URL.

Returns

Promise<Response<FaasData<Path>>>

Response returned by the active browser client.

Example

import { faas } from '@faasjs/ant-design'

const response = await faas('features/users/api/get', { id: 1 })