1.0.9 • Published 6 years ago

save-resp v1.0.9

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

save-resp

Simple CLI tool for making ajax request then save the response to a local file system. Can be configured to run on an interval over a given amount of time. Depending on the content-type header the response will be saved as .json, .xml or .txt.

Usage

The follow will make a request to a given url every second a period of 10 seconds while saving each response to the /Users/me directory.

  save-resp -u "<ENDPOINT_URL>" "data" -t 10000 -i 1000 -o "/Users/me/"

Install

  npm install --save save-resp

Options

optiondescription
-h, --helpDisplay this usage guide.
-u, --url stringURL to make request to.
-o, --out stringPath to where you want to store responses. Default is current dir.
-i, --interval numberInterval at which URL will be called.
-t, --timeout numberPeriod of time you wish to make ajax calls. Interval is required.
-p, --prefix stringPrefix for filename. Ex: data_1528231421562.json
-s, --timestampUse timestamp or date in filename, Ex: data1528231421562.json vs,data_Tue_Jun_05_2018_21:57:20_GMT-0400(EDT).json. Default is false.
1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago