https://github.com/eginez/asyncrestclient
This is a light weight extension of groovy's RESTClient to support asyn call via RxJava
https://github.com/eginez/asyncrestclient
Last synced: 7 months ago
JSON representation
This is a light weight extension of groovy's RESTClient to support asyn call via RxJava
- Host: GitHub
- URL: https://github.com/eginez/asyncrestclient
- Owner: eginez
- License: apache-2.0
- Created: 2015-11-10T16:40:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T19:36:58.000Z (almost 4 years ago)
- Last Synced: 2024-05-02T23:44:18.835Z (about 1 year ago)
- Language: Groovy
- Homepage:
- Size: 296 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[  ](https://bintray.com/eginez/maven/org.eginez.groovy.AsyncRestClient/_latestVersion)
# AsyncRestClient
This is a light weight extension of groovy's RESTClient to support asyn call via RxGroovyInstall:
```groovy
dependencies {
compile 'org.eginez.groovy:AsyncRestClient:1.+'
}
```For RESTClient documentation: https://github.com/jgritman/httpbuilder/wiki/RESTClient.
For RxGroovy documentation: https://github.com/ReactiveX/RxGroovyQuick example:
```groovy
with(AsyncRest) {
new RESTClient('https://google.com')
.getAsync(path:'/')
.subscribe { res -> println res.data }
}
```
And of course harness the power of RxJava :D
```groovy
with(AsyncRest){
Observable.zip(
new RESTClient('http://someurl.com/part_1').getAsync(),
new RESTClient('http://someurl.com/part_2').getAsync(),
{ res1, res2
//proccess them eg:
[res1.data: res2.data]
})
.subscribe { println '2 concurrent rest calls sync\'d for processing'}
}
```