Skip to content

Instantly share code, notes, and snippets.

@hhariri
Created April 4, 2015 14:48
Show Gist options
  • Save hhariri/19b02fb111bf4c327f8d to your computer and use it in GitHub Desktop.
Save hhariri/19b02fb111bf4c327f8d to your computer and use it in GitHub Desktop.
return ObservableHttp.createRequest(HttpAsyncMethods.createGet(url), client)
.toObservable()
.flatMap({ response -> response.getContent().map {
byte ->
String(byte)
}
})
.toBlocking()
.forEach {
data -> println(data)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment