0.4.2 • Published 9 years ago

ys-vcr v0.4.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

VCR Build Status

Use json based cassettes to playback http queries.

npm.io

Usage

vcr = require('vcr')
...
vcr.playback()
vcr.play('jurassic_park.vhs')
vcr.stop()

vcr.playback()

This will block all connections with nock

vcr.play()

This will mock connections to a certain endpoint

vcr.stop()

This will reallow connections

VHS format

module.exports.cassettes = {
  'imdb rating post': {
    'host': 'https://api.imdb.com',
    'path': '/',
    'method': 'post',
    'body': { 'jurassicPark': { 'rating': '💕'}},
    'code': 200
  }
}
0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago