Permalink
Browse files

Merge pull request #49 from MarceloEmmerich/master

Allow for API-level customer headers to be set in apiconfig.json.
  • Loading branch information...
2 parents c67a665 + 4f0a531 commit 381a92e21ecad045f7ef5a398198a1d7f5fd0ccc @mansilladev mansilladev committed Oct 26, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 app.js
  2. +1 −0 public/data/apiconfig.json
View
2 app.js
@@ -310,7 +310,7 @@ function processRequest(req, res, next) {
var paramString = query.stringify(params),
privateReqURL = apiConfig.protocol + '://' + apiConfig.baseURL + apiConfig.privatePath + methodURL + ((paramString.length > 0) ? '?' + paramString : ""),
options = {
- headers: {},
+ headers: apiConfig.headers,
protocol: apiConfig.protocol + ':',
host: baseHostUrl,
port: baseHostPort,
@@ -4,6 +4,7 @@
"protocol": "http",
"baseURL": "api.klout.com",
"publicPath": "/1",
+ "headers" : {},
"auth": "key",
"keyParam": "key"
},

0 comments on commit 381a92e

Please sign in to comment.