don't ignore args when method without body

in case of GET or DELETE request
This commit is contained in:
MerkushevKirill
2015-06-15 18:14:58 +03:00
parent 861fd55d06
commit 931ed7adac

View File

@@ -211,7 +211,7 @@ class Requester {
private <T> T _to(String tailApiUrl, Class<T> type, T instance) throws IOException {
while (true) {// loop while API rate limit is hit
if (method.equals("GET") && !args.isEmpty()) {
if (METHODS_WITHOUT_BODY.contains(method) && !args.isEmpty()) {
StringBuilder qs=new StringBuilder();
for (Entry arg : args) {
qs.append(qs.length()==0 ? '?' : '&');