Socket
Socket
Sign inDemoInstall

bed-rest

Package Overview
Dependencies
22
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bed-rest

A REST Client API Generator


Version published
Maintainers
1
Install size
1.22 MB
Created

Readme

Source

Bed

A REST Client API Generator

var bed = new Bed();
bed.auth('bearer', 'token');
bed.base('https://api.example.com');
bed.type('application/json');
bed.accept('application/vnd.github.v3+json');

exports.listUsers = bed.get('/users').make();
exports.getUser = bed.get('/users/<id>').make(); // <> = required, [] = optional
exports.createUser = bed.post('/users').make();

yield exports.listUsers();
yield exports.getUser(); // throws argument error (missing "id")
yield exports.createUser({});

Keywords

FAQs

Last updated on 17 Mar 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc