alanchurley-url-checker
v0.0.5
Published
Checks a given url and returns request time
Downloads
1
Readme
urlChecker
Checks a given url, and returns an object containing the response time from the url
Usage
var urlChecker = require('alanchurley-url-checker'); urlChecker.checkUrl(urlDomain, port, path, callback);
Where the urlDomain and path are strings, port is a integer, and callback is a function
Response
Response will be in the following format
{ status: x, time: y }
Status will either be 1 for a valid request, or 0 for an error
time is the time in millseconds that the request took, only supplied if status code is non 0