Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    json-restpublic

    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.

    Keywords

    none

    install

    npm i json-rest

    Downloadslast 7 days

    1

    version

    1.0.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar