hunk.code_window:     "script-loader": "^0.7.0",
       "semver": "^5.3.0",
       "silent-error": "^1.0.0",
       "source-map": "^0.5.6",
       "source-map-loader": "^0.1.5",
       "sourcemap-istanbul-instrumenter-loader": "^0.2.0",
       "style-loader": "^0.13.1",
       "stylus": "^0.54.5",
       "stylus-loader": "^2.4.0",
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.file_path: package.json
hunk.type: replace
file: import {IncomingMessage} from 'http';
  import * as _request from 'request';
  
  
  export function request(url: string): Promise<string> {
    return new Promise((resolve, reject) => {
      let options = {
        url: url,
        headers: { 'Accept': 'text/html' },
        agentOptions: { rejectUnauthorized: false }
      };
      _request(options, (error: any, response: IncomingMessage, body: string) => {
        if (error) {
          reject(error);
        } else if (response.statusCode >= 400) {
          reject(new Error(`Requesting "${url}" returned status code ${response.statusCode}.`));
        } else {
          resolve(body);
        }
      });
    });
  }
  