Documents / Class: FaasBrowserClient
Class: FaasBrowserClient
FaasJS browser client
const client = new FaasBrowserClient('http://localhost:8080')
await client.action('func', { key: 'value' })
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new FaasBrowserClient(baseUrl
, options?
)
Parameters
Name | Type |
---|---|
baseUrl | string |
options? | Options |
Properties
defaultOptions
• defaultOptions: Options
host
• host: string
Methods
action
▸ action<PathOrData
>(action
, params?
, options?
): Promise
<Response
<FaasData
<PathOrData
>>>
Request a FaasJS function
Type parameters
Name | Type |
---|---|
PathOrData | extends Record <string , any > |
Parameters
Name | Type | Description |
---|---|---|
action | string | PathOrData | function path |
params? | FaasParams <PathOrData > | function params |
options? | Options | request options ts await client.action('func', { key: 'value' }) |