micro-action-callers
v2.0.1
Published
Callers to help call micro-action service.
Downloads
4
Readme
Micro Action Callers
Callers to help call micro-action service.
API
requestResponse
async func(url, cmd, input) => fetchResponse
requestBody
async func(url, cmd, input) => body
body
is the payload of the http response. Possible fields are:
- ok - boolean, indicates whether the it is a success or failure response.
- code - string, used to distinguish response cases
- output - the payload of this response
- error - if it is a failure response, it may include an error object which contains information about what's happened to help debug.
requestOkBody
async func(url, cmd, input) => body
Only return if the body.ok=true, otherwise errors will be thrown.
requestOk
async func(url, cmd, input) => output
Call the service and resolve out the output. Only success case will be resolved, otherwise errors will be thrown.
Relative Project
License
ISC