Fix slash escape in REST API path

addPathSegment escapes slash. This PR changes endpoint from
rest%2Ffoo.view to rest/foo.view
This commit is contained in:
Josip Sokcevic 2017-04-11 23:18:29 -07:00
parent 1a31b4b645
commit fb71facfea
1 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,8 @@ public final class Util {
String username = prefs.getString(Constants.PREFERENCES_KEY_USERNAME + instance, null); String username = prefs.getString(Constants.PREFERENCES_KEY_USERNAME + instance, null);
String password = prefs.getString(Constants.PREFERENCES_KEY_PASSWORD + instance, null); String password = prefs.getString(Constants.PREFERENCES_KEY_PASSWORD + instance, null);
builder.addPathSegment("rest/" + method + ".view"); builder.addPathSegment("rest");
builder.addPathSegment(method + ".view");
int hash = (username + password).hashCode(); int hash = (username + password).hashCode();
Pair<String, String> values = tokens.get(hash); Pair<String, String> values = tokens.get(hash);