@argodigital/formula-response

1.1.1 • Public • Published

formula-response

Handles data (or error) response returned by handler. Provides unified shape of response for all formula services.

Customization

By default response will return data with status code 200 or an error with status code matching code in statuses package (see errors package for error customization).

In addition, response can be customized through input of formula-sl-function and responseOptions object. In example:

postUser:
    component: "@argodigital/formula-sl-function"
    responseOptions:
        statusCode: 201
        attributes:
            - name
            - email
            - dob
        id: userId

More options are listed on jsonapi-serializer package page.

Readme

Keywords

none

Package Sidebar

Install

npm i @argodigital/formula-response

Weekly Downloads

3

Version

1.1.1

License

ISC

Unpacked Size

11.6 kB

Total Files

8

Last publish

Collaborators

  • argo-chulander
  • argo-digital-dev
  • argojade
  • baronswindle
  • benshimmin
  • heatherlorenzo
  • radociech
  • toby.jackson.argolimited