Skip to content

Commit

Permalink
Content-Type custom header fix + misc housekeeping
Browse files Browse the repository at this point in the history
app.js - check to see if a custom Content-Type header field value is
set before placing the standard form-urlencoded value.

files in publid/data/ - removed fanfeedr and simplegeo.

TODO: Removal of simplegeo config also removes example of 2-legged
OAuth 1 -- should add this configuration example in another doc file.
  • Loading branch information
mansilladev committed Oct 26, 2012
1 parent 381a92e commit b8ff020
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1,447 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ function processRequest(req, res, next) {
}
}

if (requestBody) {
if (!options.headers['Content-Type'] && requestBody) {
options.headers['Content-Type'] = 'application/x-www-form-urlencoded';
}

Expand Down
42 changes: 11 additions & 31 deletions public/data/apiconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,29 @@
"auth": "key",
"keyParam": "key"
},
"fanfeedr": {
"name": "FanFeedr Sports Basic API",
"usatoday": {
"name": "USA TODAY Census API",
"protocol": "http",
"baseURL": "ffapi.fanfeedr.com",
"publicPath": "",
"baseURL": "api.usatoday.com",
"publicPath": "/open",
"auth": "key",
"keyParam": "api_key"
},
"usatoday": {
"name": "USA TODAY Census API",
"protocol": "http",
"baseURL": "api.usatoday.com",
"publicPath": "/open",
"auth": "key",
"keyParam": "api_key"
},
"linkedin": {
"name": "LinkedIn",
"name": "LinkedIn",
"protocol": "http",
"baseURL": "api.linkedin.com",
"publicPath": "",
"privatePath": "/v1",
"auth": "oauth",
"oauth": {
"type": "three-legged",
"requestURL": "https://api.linkedin.com/uas/oauth/requestToken",
"signinURL": "https://api.linkedin.com/uas/oauth/authorize?oauth_token=",
"accessURL": "https://api.linkedin.com/uas/oauth/accessToken",
"version": "1.0",
"crypt": "HMAC-SHA1"
"type": "three-legged",
"requestURL": "https://api.linkedin.com/uas/oauth/requestToken",
"signinURL": "https://api.linkedin.com/uas/oauth/authorize?oauth_token=",
"accessURL": "https://api.linkedin.com/uas/oauth/accessToken",
"version": "1.0",
"crypt": "HMAC-SHA1"
},
"keyParam":""
},
"simplegeo": {
"name": "SimpleGeo",
"protocol": "http",
"baseURL": "api.simplegeo.com",
"publicPath": "",
"auth": "oauth",
"oauth": {
"type": "two-legged",
"version": "1.0",
"crypt": "HMAC-SHA1"
}
}
}
Loading

0 comments on commit b8ff020

Please sign in to comment.