Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .gitignore
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
Octocat-spinner-32 readme.markdown
readme.markdown

json-rest

make json-rest requests just a little bit more convenient, than request, which is too general purpose.

Example

// set defaults

var jrest = require('json-rest'
var req = jrest({
  url: "http://whatever.com",
  auth: "user:password" // will set the auth header for you
}) 

req({path: '/extends/the/default/url'}, function (err, data) {
  if(err) throw err
  console.error(data) //data is parsed for you.
})

that is it.

Something went wrong with that request. Please try again.