Skip to content

saintedlama/request-parse-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

request-parse-json

Simple module to parse response from request module as JSON.

Installation

> npm install request-parse-json --save

Usage

var request = require('request');
var parseJSON = require('request-parse-json');

request({
  method : 'GET',
  url : 'https://api.github.com/repos/saintedlama/request-parse-json',
  headers : {
    'Accept' : 'application/vnd.github.v3+json',
    'User-Agent' : 'request-parse-json'
  }
}, parseJSON(next)); // Pass err, response, parsed body and raw body to next

function next(err, response, repository, body) {
  // Do something...
}

About

Simple module to parse response from request module as JSON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published