2.0.1 • Published 7 years ago

micro-action-callers v2.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

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

2.0.1

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago