Added QueryStringEncoder.toString()
This commit is contained in:
parent
2d92771ae6
commit
7d37a2f78b
@ -50,8 +50,13 @@ public class QueryStringEncoder {
|
||||
}
|
||||
|
||||
public URI toUri() throws URISyntaxException {
|
||||
return new URI(toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (params.size() == 0) {
|
||||
return new URI(url);
|
||||
return url;
|
||||
}
|
||||
else {
|
||||
StringBuilder sb = new StringBuilder(url).append("?");
|
||||
@ -62,7 +67,7 @@ public class QueryStringEncoder {
|
||||
sb.append("&");
|
||||
}
|
||||
}
|
||||
return new URI(sb.toString());
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user