Skip to content

zhaoyao91/micro-action-callers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Callers to help call micro-action service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published