lib/resolvers/http.js
function readHttp (file) {
    var u = url.parse(file.url);

    if (process.browser && !u.protocol) {
      // Use the protocol of the current page
      u.protocol = url.parse(location.href).protocol;
    }

    return download(u, this);
  }
function readHttp (file) {
    var u = url.parse(file.url);

    if (process.browser && !u.protocol) {
      // Use the protocol of the current page
      u.protocol = url.parse(location.href).protocol;
    }

    return download(u, this);
  }
function readHttp ( file ) { var u = url . parse ( file . url ) ; if ( process . browser && ! u . protocol ) { // Use the protocol of the current page u . protocol = url . parse ( location . href ) . protocol ; } return download ( u , this ) ; }
Reads the given URL and returns its raw contents as a Buffer.

@param {object} file           - An object containing information about the referenced file
@param {string} file.url       - The full URL of the referenced file
@param {string} file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
@returns {Promise<Buffer>}
Reads the given URL and returns its raw contents as a Buffer .