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/dev / JsonHandlerBody

Type Alias: JsonHandlerBody<TApi>

JsonHandlerBody<TApi> = FuncEventType<TApi> extends object ? 0 extends 1 & TParams ? Record<string, any> | string | null : TParams | string | null : Record<string, any> | string | null

Request body accepted by ApiTester.JSONhandler and testApi.

Uses the wrapped API params type when it can be inferred; raw strings are also accepted so tests can send malformed JSON or custom payloads.

Type Parameters

TApi

TApi extends Func<any, any, any>