Created
August 8, 2020 09:55
-
-
Save manoj-mili/913960ab32112b33c6cf40eedeb6f4e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static final String URLEx = "https://jsonplaceholder.typicode.com/users/{user_id}/albums"; | |
Rx2AndroidNetworking.get(URLEx).addPathParameter("user_id", "1").build().getJSONArraySingle().doOnSuccess(jsonArray -> { | |
//Handle once data is available | |
}).doOnError(throwable -> { | |
//Handle in case of Error | |
}).subscribeOn(Schedulers.io()) | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment