@@ -92,6 +92,7 @@ function get(config, pathname, proxy, agent, callback, encoding) {
9292 }
9393
9494 if ( encoding !== "binary" ) {
95+ options . headers [ "X-WPT-API-KEY" ] = this . config . key ;
9596 options . headers [ "accept-encoding" ] = "gzip,deflate" ;
9697 options . headers [ "User-Agent" ] = "WebpagetestNodeWrapper/v0.6.0" ;
9798 }
@@ -338,9 +339,10 @@ function getTestBalance(options, callback) {
338339 options = options === callback ? undefined : options ;
339340
340341 var query = helper . setQuery ( mapping . commands . testBalance , options ) ;
341- if ( ! query . k && this . config . key ) {
342- query . k = this . config . key ;
343- }
342+ // API key (to pass with the parans) (depricated)
343+ // if (!query.k && this.config.key) {
344+ // query.k = this.config.key;
345+ // }
344346 return api . call ( this , paths . testBalance , callback , query , options ) ;
345347}
346348
@@ -366,10 +368,10 @@ function runTest(what, options, callback) {
366368 // json output format
367369 query . f = "json" ;
368370
369- // API key
370- if ( ! query . k && this . config . key ) {
371- query . k = this . config . key ;
372- }
371+ // API key (to pass with the parans) (depricated)
372+ // if (!query.k && this.config.key) {
373+ // query.k = this.config.key;
374+ // }
373375
374376 // synchronous tests with results
375377 var testId ,
0 commit comments