/ResponseHandler

Primary LanguageJavaScriptApache License 2.0Apache-2.0

ResponseHandler

This module allows easier/cleaner way to handle HTTP JSON response.

Installation

npm i -S handle-response

Usage

RH = require('handle-response');

(req, res) => doSomething(req).then(RH.handleSuccess(res)).catch(RH.handleError(res));