Differences

This shows you the differences between two versions of the page.

Link to this comparison view

irc:1468533600 [2017/05/27 13:44]
irc:1468533600 [2017/05/27 13:44] (current)
Line 1: Line 1:
 +[00:04:23] <​temporalfox>​ AlexLehm merged thanks!
 +
 +[00:04:36] <​AlexLehm>​ thank you
 +
 +[00:06:18] <​temporalfox>​ btw I created this issue
 +
 +[00:06:18] <​temporalfox>​ https://​github.com/​eclipse/​vert.x/​issues/​1498
 +
 +[00:10:05] <​AlexLehm>​ yes, i can take look
 +
 +[00:18:36] <​AlexLehm>​ temporalfox:​ i think the pr is not yet merged
 +
 +[00:21:21] <​temporalfox>​ wdym ?
 +
 +[00:21:41] <​temporalfox>​ done now
 +
 +[00:22:14] <​AlexLehm>​ the issue is closed the pr is still open
 +
 +[00:22:22] <​AlexLehm>​ ah thank you
 +
 +[08:24:06] <​auszone>​ Hi, I'm trying to issue multiple http requests. But these requests are dependent on each other. e.g. issue request A and then issue request AFTER getting the response from A...
 +
 +[08:24:14] <​auszone>​ What's the proper way to do this?
 +
 +[09:02:39] *** ChanServ sets mode: +o temporalfox
 +
 +[09:09:00] <​AlexLehm_>​ auszone: you can chain the operations by starting the 2nd request in the handler of request 1 etc, you can use Future to chain the requests or you could take a look at rx
 +
 +[09:12:51] <​auszone>​ My current impl is that I wrap each http request in a method and it returns a Future<​HttpClientResponse>​
 +
 +[09:14:12] <​auszone>​ so the signature would be like this : public Future<​HttpClientResponse>​ someHttpRequestMethod()
 +
 +[09:21:45] <​AlexLehm_>​ then you should be able to register a handler on a Future that starts the next operation and the handler for last Future is called when the operations are finished
 +
 +[09:23:35] <​auszone>​ yeah but i wanna avoid callback hell.
 +
 +[09:23:49] <​auszone>​ I got 6 requests to send.
 +
 +[09:42:18] <​AlexLehm_>​ you could give rx a try, that is supposed to be much easier to compose connected operations
 +
 +[09:42:56] <​AlexLehm_>​ to a certain degree the handler thing is unavoidable,​ however i don't think this is too bad, since you create all operations after one another
 +
 +[09:43:02] <​AlexLehm_>​ its not really nested callbacks
 +
 +[14:09:52] *** ChanServ sets mode: +o temporalfox
 +
 +[15:29:30] *** ChanServ sets mode: +o temporalfox