Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

support for default headers

in apiconfig.json, you can add "headers" : {} to a config entry to use
default headers. Format is:

"header" : { "key1":"value1", "key2":"value2", ...  }
  • Loading branch information...
commit 4f0a531d97a74c71cda301572fbf0e18775389d9 1 parent c67a665
Marcelo Emmerich MarceloEmmerich authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  app.js
  2. +1 −0  public/data/apiconfig.json
2  app.js
View
@@ -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,
1  public/data/apiconfig.json
View
@@ -4,6 +4,7 @@
"protocol": "http",
"baseURL": "api.klout.com",
"publicPath": "/1",
+ "headers" : {},
"auth": "key",
"keyParam": "key"
},
Please sign in to comment.
Something went wrong with that request. Please try again.