'use strict';

const request = require('request');
const url = require('url');

let robotto = {};

robotto._getRobotsUrl = function(urlP) {
    let receivedUrl = url.parse(urlP);
    return `${receivedUrl.protocol}\/\/${receivedUrl.host}/robots.txt`;
};




};

module.exports = robotto;

@@ -248,18 +248,571 @@
 t%60;%0A%7D;%0A%0A
-%0A%0A
+robotto._request = request;%0A%0Arobotto.fetch = function(urlP, callback) %7B%0A    callback = typeof callback === 'function' ? callback : new Function();%0A%0A    let robotsUrl = robotto._getRobotsUrl(urlP);%0A%0A    robotto._request(robotsUrl, (err, res, body) =%3E %7B%0A        if (err) %7B%0A            callback(err);%0A            return;%0A        %7D%0A%0A        if (res.statusCode !== 200) %7B%0A            callback(new Error(%60Could not fetch robots.txt from $%7BurlP%7D, the server returned $%7Bres.statusCode%7D code%60));%0A            return;%0A        %7D%0A%0A        callback(null, body);%0A    %7D);
 %0A%7D;%0A%0Amod

Implement fetch