Getting a concrete value

OK, we can compose Futures to have new Futures but, at some point, we will need to have a concrete value instead of Future.

When we asked to get the response of a REST call, we receive Future from the function. The particularity of Future is that we do not know when it is going to finish so in our test we need to wait until we get the concrete value of Future.

To get a concrete value, you can either wait for Future to complete or provide a callback. Let us go into the details of both cases.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset