berkeleybop/bbop-rest-response

Name: bbop-rest-response

Owner: Berkeley BOP

Description: Generic handler for dealing with the gross parsing and handling of responses from a REST service.

Created: 2015-07-28 23:27:44.0

Updated: 2016-02-19 00:39:28.0

Pushed: 2016-10-21 01:05:21.0

Homepage: null

Size: 82

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

bbop-rest-response

Overview

Generic handler for dealing with the gross parsing and handling of responses from a RESTful service.

In an ideal world, nobody should be probing/decoding responses from services manually, but this happens all too often as people try and make progress as their increasingly complicated applications evolve–too many errors creep in as data “schema” change and people write or use conflicting or out-of-date probulators.

The generic BBOP RESTful response is a class that can be instantiated with either a a string or a JSON object and specifies the following functions:

The pattern presented here is intended to be subclassed to create useful and rich types for understanding the responses for your various and sundry data services. More specifically, this is intended to be used with the automatic response instantiation of bbop-rest-managers.

This package contains a “null” and a simple JSON version of this functionality. For more detailed information, please see the unit tests.

Availability

GitHub

NPM

API

index


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.