Skip to content

eginez/AsyncRestClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsyncRestClient

This is an light weight extension of groovy's RESTClient to support asyn call via RxGroovy

For RESTClient documentation: https://github.com/jgritman/httpbuilder/wiki/RESTClient. For RxGroovy documentation: https://github.com/ReactiveX/RxGroovy

Quick example:

new AsyncRestClient('https://google.com') .getAsync(path:'/') .subscribe { res -> println res.data }

And of course harness the power of RxJava :D

Observable<Object>.zip( new AsyncRestClient('http://someurl.com/part_1').getAsync(), new AsyncRestClient('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'}

About

This is a light weight extension of groovy's RESTClient to support asyn call via RxJava

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages