Fixed Uri builder
This commit is contained in:
parent
cbca5de890
commit
c69dfff36c
|
@ -20,7 +20,7 @@ import android.net.Uri;
|
||||||
public class MiroConnector {
|
public class MiroConnector {
|
||||||
private HttpClient httpClient;
|
private HttpClient httpClient;
|
||||||
|
|
||||||
private static final String HOST_URL = "www.miroguide.com/api/";
|
private static final String HOST_URL = "https://www.miroguide.com/api/";
|
||||||
private static final String PATH_GET_CHANNELS = "get_channels";
|
private static final String PATH_GET_CHANNELS = "get_channels";
|
||||||
private static final String PATH_LIST_CATEGORIES = "list_categories";
|
private static final String PATH_LIST_CATEGORIES = "list_categories";
|
||||||
private static final String PATH_GET_CHANNEL = "get_channel";
|
private static final String PATH_GET_CHANNEL = "get_channel";
|
||||||
|
@ -34,9 +34,8 @@ public class MiroConnector {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Uri.Builder getBaseURIBuilder(String path) {
|
private Uri.Builder getBaseURIBuilder(String path) {
|
||||||
Uri.Builder builder = new Uri.Builder();
|
Uri.Builder builder = Uri.parse(HOST_URL).buildUpon();
|
||||||
builder.scheme("https").appendPath(HOST_URL).appendPath(path)
|
builder.appendPath(path).appendQueryParameter("datatype", "json");
|
||||||
.appendQueryParameter("datatype", "json");
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue