Skip to content

Law adapter for exposing a REST service. Uses axios under the covers.

Notifications You must be signed in to change notification settings

TorchlightSoftware/law-axios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Law Axios

Law adapter for exposing a REST service. Uses axios under the covers.

Usage

const PORT = 3000
const rest = require('law-axios')
const {expect} = require('chai')

const api = rest({
  json: true,
  domain: `http://0.0.0.0:${PORT}`,
})

api('GET /theanswer', {q: 'to life, the universe, and everything'})
  .then(theanswer => expect(theanswer).to.equal(42))

About

Law adapter for exposing a REST service. Uses axios under the covers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published