Skip to content

alex94cp/superagent-jsonapify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

superagent-jsonapify

NPM

Dependencies

A lightweight json-api client addon for superagent. If you don't know about jsonapify or the JSON-API format, you should have a look.

Usage

ES2015 style

import superagent from 'superagent';
import superagentJsonapify from 'superagent-jsonapify';

superagentJsonapify(superagent);

const request = superagent.get('/api/videos?include=comments')
  .then(function(response) {
    const body = response.body;
    const video = body.data[0];
    const comments = video.comments;
  });

About

A lightweight json-api client addon for superagent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published