Skip to content

Commit

Permalink
Removed extraneous "?" from URL when no paramteres are supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkaplan committed Sep 13, 2011
1 parent 298c903 commit 6db92c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 6db92c9

Please sign in to comment.