Skip to content
This repository has been archived by the owner on May 23, 2020. It is now read-only.

justinvdm/recq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recq

Record requests to a json file. Useful for recording api requests (possibly for use as fixtures).

$ recq -k foo -d '{"bar":"baz"}' http://foo.com 
{
  "foo": {
    "request": {
      "method": "GET",
      "url": "http://foo.com",
      "data": {
        "bar": "baz"
      }
    },
    "response": {
      "code": 200,
      "data": {
        "lerp": "larp"
      }
    }
  }
}

Usage

$ recq --help

  Usage: recq.coffee [options] <url>

  Options:

    -h, --help                        output usage information
    -V, --version                     output the version number
    -m, --method <method>             The http request method to use
    -f, --file <file>                 The storage file to use
    -k, --key <key>                   The key to use for the datum in the file if the file is a json object
    -d, --data <data>                 Request body data
    -a, --auth <username>:<password>  Basic auth
    -t, --type <type>                 The type of the request. May be any value allowed by superagent.

About

record requests to a json file

Resources

License

Stars

Watchers

Forks

Packages

No packages published