npm.io
1.10.3 • Published 10 months ago

art-rest-client

Licence
ISC
Version
1.10.3
Deps
4
Size
32 kB
Vulns
0
Weekly
0
Stars
2

ArtRestClient Build Status

Promise-based rest-client javascript library. Makes HTTP/HTTPS easy.

Works both in browser and NodeJs.

Features

  • promise based
  • streamlined JSON requests
  • streamlined binary support
  • CORS friendly

Install

npm install art-rest-client
Example
RestClient = require './art-rest-client'

RestClient.getJson "http://somewhere.com/users/123"
.then ({username, email}) ->
  RestClient.putJson "http://somewhere.com/users/123",
    username: "Mr New #{username}"
Info

uses XMLHttpRequest2:

Future?

The new-new is 'fetch' - seems to be getting decent support