Skip to content

Commit

Permalink
fix query string bugs in queryByNap
Browse files Browse the repository at this point in the history
  • Loading branch information
seancarr committed Sep 12, 2011
1 parent afc024d commit bebeeec
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions java/src/com/rapleaf/api/personalization/RapleafApi.java
Expand Up @@ -196,13 +196,13 @@ public JSONObject queryByNap(String first, String last, String street, String ci
String url; String url;
if (email != null) { if (email != null) {
url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey + url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey +
"?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "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") + "&street=" + URLEncoder.encode(street, "UTF-8") + "&city=" + URLEncoder.encode(city, "UTF-8") +
"?state=" + URLEncoder.encode(state, "UTF-8"); "&state=" + URLEncoder.encode(state, "UTF-8");
} else { } else {
url = BASE_URL + "&api_key=" + apiKey + "?state=" + URLEncoder.encode(state, "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") + "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8") +
"?street=" + URLEncoder.encode(street, "UTF-8") + "?city=" + URLEncoder.encode(city, "UTF-8"); "&street=" + URLEncoder.encode(street, "UTF-8") + "&city=" + URLEncoder.encode(city, "UTF-8");
} }
return getJsonResponse(url, showAvailable); return getJsonResponse(url, showAvailable);
} }
Expand Down Expand Up @@ -244,11 +244,11 @@ public JSONObject queryByNaz(String first, String last, String zip4, String emai
String url; String url;
if (email != null) { if (email != null) {
url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey + url = BASE_URL + "?email=" + URLEncoder.encode(email, "UTF-8") + "&api_key=" + apiKey +
"?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8") + "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8") +
"?zip4=" + zip4; "&zip4=" + zip4;
} else { } else {
url = BASE_URL + "&api_key=" + apiKey + "?zip4=" + zip4 + url = BASE_URL + "?api_key=" + apiKey + "&zip4=" + zip4 +
"?first=" + URLEncoder.encode(first, "UTF-8") + "?last=" + URLEncoder.encode(last, "UTF-8"); "&first=" + URLEncoder.encode(first, "UTF-8") + "&last=" + URLEncoder.encode(last, "UTF-8");
} }
return getJsonResponse(url, showAvailable); return getJsonResponse(url, showAvailable);
} }
Expand Down

0 comments on commit bebeeec

Please sign in to comment.