UNPKG

physical-node

Version:

virtual physical network infrastructure layer for node

10 lines (9 loc) 293 B
import request = require("request"); export function promiseRequest(url : string) : Promise<string>{ return new Promise((a,r)=>{ request(url, (error : any, response : any, body : string) => { if(error) r(error); else a(body); }); }); }