1.0.3 • Published 4 years ago

http-response-builder v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

http-response-builder

This package provides ability to build http response from server side. It allows you to return response according to one pattern when you work in a team.

No dependencies.

Installation

npm install http-response-builder --save

Usage

const ResponseBuilder = require('http-response-builder');

const response = new ResponseBuilder();

response.addItem() // add in response item property
response.addItems() // add in response items property
response.success() // for change status boolean default true
response.addProperty() // add in response property with custom name and assign value for it
response.message() // add in response message
response.get() // return response data
response.getJson() // return response data in json string