refactor with async/await

Trying to be more robust about error handling and failure.
This commit is contained in:
Roman Shtylman
2016-07-09 17:06:13 -07:00
parent f12f1c81b3
commit a2a58f4c6f
10 changed files with 290 additions and 221 deletions

View File

@@ -1,6 +1,6 @@
var http = require('http');
var util = require('util');
var assert = require('assert');
import http from 'http';
import util from 'util';
import assert from 'assert';
// binding agent will return a given options.socket as the socket for the agent
// this is useful if you already have a socket established and want the request
@@ -20,4 +20,4 @@ function create_connection(port, host, options) {
return this.socket;
}
module.exports = BindingAgent;
export default BindingAgent;