codebasepk / requestsj

Inspired by Python's Requests
2 stars 7 forks source link

Add CompletableFuture based API option #4

Open om26er opened 4 years ago

om26er commented 4 years ago

We should support Java8' CompletableFuture. In Android it's only available on API level 24+. It will enable us to provide an alternate to the current callbacks approach.

NB: An issue for providing CompletableFuture for older versions of Android exists with upstream https://issuetracker.google.com/issues/153794291. With Android Studio 4.0 the new desugar support was improved and we may eventually see the upstream embrace it.

om26er commented 4 years ago

One option would be to use https://github.com/retrostreams/android-retrofuture