1.1.1 • Published 8 years ago

restauth v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

RestAuth

A Rest client supporting authentication with JSON Web Token and cookies. Useful for testing authenticated REST API.

NPM version Dependency Status

Install

$ npm install --save restauth

Usage

import {Client} from 'restauth';

let config = {
  username:"alice",
  password:"password",
  url:"http://localhost:3000/api/"
};

let client = new Client(config);
let resLogin = await client.login();
assert(resLogin);
let me = await client.get('v1/me');
assert(me);

Test

$ npm test

License

MIT © Frederic Heem

1.1.1

8 years ago

1.0.1

8 years ago

0.1.2

8 years ago

0.1.0

9 years ago