Permalink
Browse files

fix query string bugs in queryByNap

  • Loading branch information...
1 parent afc024d commit bebeeeca463942553f084eb8c5d70fca18b68d5a @seancarr seancarr committed Sep 12, 2011
Showing with 10 additions and 10 deletions.
  1. +10 −10 java/src/com/rapleaf/api/personalization/RapleafApi.java
@@ -196,13 +196,13 @@ public JSONObject queryByNap(String first, String last, String street, String ci
String url;
if (email != null) {
url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey +
- "?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8") +
- "?street=" + URLEncoder.encode(street, "UTF-8") + "?city=" + URLEncoder.encode(city, "UTF-8") +
- "?state=" + URLEncoder.encode(state, "UTF-8");
+ "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8") +
+ "&street=" + URLEncoder.encode(street, "UTF-8") + "&city=" + URLEncoder.encode(city, "UTF-8") +
+ "&state=" + URLEncoder.encode(state, "UTF-8");
} else {
- url = BASE_URL + "&api_key=" + apiKey + "?state=" + URLEncoder.encode(state, "UTF-8") +
- "?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8") +
- "?street=" + URLEncoder.encode(street, "UTF-8") + "?city=" + URLEncoder.encode(city, "UTF-8");
+ url = BASE_URL + "?api_key=" + apiKey + "&state=" + URLEncoder.encode(state, "UTF-8") +
+ "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8") +
+ "&street=" + URLEncoder.encode(street, "UTF-8") + "&city=" + URLEncoder.encode(city, "UTF-8");
}
return getJsonResponse(url, showAvailable);
}
@@ -244,11 +244,11 @@ public JSONObject queryByNaz(String first, String last, String zip4, String emai
String url;
if (email != null) {
url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey +
- "?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8") +
- "?zip4=" + zip4;
+ "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8") +
+ "&zip4=" + zip4;
} else {
- url = BASE_URL + "&api_key=" + apiKey + "?zip4=" + zip4 +
- "?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8");
+ url = BASE_URL + "?api_key=" + apiKey + "&zip4=" + zip4 +
+ "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8");
}
return getJsonResponse(url, showAvailable);
}

0 comments on commit bebeeec

Please sign in to comment.