nm-request

0.0.2-12 • Public • Published

##nm-request##

nm-request can be used to request an URL and get time and status back. You can use it from node.js with require("nm-request") but also from command line.

Typically use would be for monitoring uptime of a website.

Data returned: { requestTime: 1923, statusCode: 200, startDate: someDate, isSuccess: true, baseLineStatusCode: 200, baseLineTime: 99 }

##From node.js###

var nmrequest = require('nm-request');

var options = { url:'http://npmjs.org', baseLineUrl:'http://www.google.se', timeout:10000 }

nmrequest(options, callback);

##From command line### node node_modules/nm-request/index.js --url http://npmjs.org --baseLineUrl http://www.google.se --timeout 10000

Readme

Keywords

none

Package Sidebar

Install

npm i nm-request

Weekly Downloads

0

Version

0.0.2-12

License

MIT

Last publish

Collaborators

  • codersthlm