Browse files

Removed extraneous "?" from URL when no paramteres are supplied

  • Loading branch information...
1 parent 298c903 commit 6db92c9ff6ea24fbbaae6d6a4462bfb7bd289403 @adamkaplan committed Sep 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.js
View
4 app.js
@@ -299,13 +299,13 @@ function processRequest(req, res, next) {
}
var paramString = query.stringify(params),
- privateReqURL = apiConfig.protocol + '://' + apiConfig.baseURL + apiConfig.privatePath + methodURL + '?' + paramString;
+ privateReqURL = apiConfig.protocol + '://' + apiConfig.baseURL + apiConfig.privatePath + methodURL + ((paramString.length > 0) ? '?' + paramString : ""),
options = {
headers: {},
protocol: apiConfig.protocol,
host: apiConfig.baseURL,
method: httpMethod,
- path: apiConfig.publicPath + methodURL + '?' + paramString
+ path: apiConfig.publicPath + methodURL + ((paramString.length > 0) ? '?' + paramString : "")
};
if (apiConfig.oauth) {

0 comments on commit 6db92c9

Please sign in to comment.