Documents / @faasjs/ant-design / faas
Function: faas()
faas<
PathOrData
>(action
,params
,options
?):Promise
<Response
<FaasData
<PathOrData
>>>
Request faas server
Type Parameters
• PathOrData extends FaasAction
Parameters
• action: string
| PathOrData
{string} action name
• params: FaasParams
<PathOrData
>
{object} action params
• options?: Options
Returns
Promise
<Response
<FaasData
<PathOrData
>>>
Example
faas<{ title: string }>('post/get', { id: 1 }).then(res => {
console.log(res.data.title)
})