Browse Source

Merge pull request #53 from Townsheriff/exposing-http-options

Added IPv6 support.
pull/54/head
Brett Langdon 9 years ago
committed by GitHub
parent
commit
f3f53465cc
2 changed files with 6 additions and 3 deletions
  1. +4
    -2
      lib/client.js
  2. +2
    -1
      package.json

+ 4
- 2
lib/client.js View File

@ -3,6 +3,7 @@ var https = require("https");
var json = require("./json");
var url = require("url");
var util = require("util");
var _ = require('lodash');
/*section: client
*comment: |
@ -15,6 +16,7 @@ var client = function(){
this.api_key = null;
this.app_key = null;
this.proxy_agent = null;
this.http_options = null;
this.api_version = "v1";
this.api_host = "app.datadoghq.com";
};
@ -66,12 +68,12 @@ client.prototype.request = function(method, path, params, callback){
"query": query,
});
var http_options = {
var http_options = _.assign({
hostname: this.api_host,
port: 443,
method: method.toUpperCase(),
path: path
};
}, this.http_options);
if(this.proxy_agent){
http_options["agent"] = this.proxy_agent;


+ 2
- 1
package.json View File

@ -35,7 +35,8 @@
"extend": "^3.0.0",
"json-bigint": "^0.1.4",
"minimist": "^1.1.1",
"rc": "^1.0.0"
"rc": "^1.0.0",
"lodash": "latest"
},
"devDependencies": {
"bignumber.js": "^2.0.7",


Loading…
Cancel
Save