lib/httpclient.js
function(headers, params) {
        var newHeaders = {};
        for (var header in headers)
            newHeaders[header] = headers[header];
        for (var param in params) {
            var re = new RegExp(":"+ param);
            for (var header in newHeaders) {
                if (newHeaders[header].search(re) != -1) {
                    newHeaders[header] = newHeaders[header].replace(re, params[param]);
                }
            }
        }
        return newHeaders;
    }
function(headers, params) {
        var newHeaders = {};
        for (var header in headers)
            newHeaders[header] = headers[header];
        for (var param in params) {
            var re = new RegExp(":"+ param);
            for (var header in newHeaders) {
                if (newHeaders[header].search(re) != -1) {
                    newHeaders[header] = newHeaders[header].replace(re, params[param]);
                }
            }
        }
        return newHeaders;
    }
function ( headers , params ) { var newHeaders = { } ; for ( var header in headers ) newHeaders [ header ] = headers [ header ] ; for ( var param in params ) { var re = new RegExp ( ":" + param ) ; for ( var header in newHeaders ) { if ( newHeaders [ header ] . search ( re ) != - 1 ) { newHeaders [ header ] = newHeaders [ header ] . replace ( re , params [ param ] ) ; } } } return newHeaders ; }
format final headers
format final headers