I am using expressjs, after running the webapagetest I am storing the url which is in string format in a variable then I am using this variable in request node module to get the data from that url, but I am getting undefined is not a valid uri or option. here is the my JavaScript code
var WebPageTest = require('webpagetest');
var wpt = new WebPageTest('url of private webpagetest instance server');
wpt.runTest('https://google.com', function(err, data) {
console.log(err || data);
console.log(data.data.summaryCSV);
sid = data.data.summaryCSV;
console.log(typeof sid);
});
request(sid,function(error,response,body){
console.log(body);
I am getting error at last line "request"
thanks.