The default executor.
Create an Http executor with some custom configuration defined by the withBuilder
function
that will mutate the underlying Builder
from AHC.
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
(Since version 0.12.2) Using the Http singleton directly is deprecated and will be removed in a future version of dispatch. Please switch to invoking Http.default for using a globally accessible default Http client.
Singleton helper for vending Http instances.
In past versions of Dispatch, this singleon was, itself, an Http executor. That could lead to a few code traps were it was possible to unintentionally allocate additional Http pools without realizing it because
Http.xxxx
andHttp().xxxx
both look very similar - yet do very different things.In the interest of avoiding such code traps in future releases of Dispatch,
Http
was changed to a helper in 0.13.x that is capable of vending a defaultHttp
executor instance or of configuring a custom one with itswithConfiguration
method.If you relied on the default
Http
instance in your code you can easily port your code to 0.13.x by simply invoking theHttp.default
method. Such as...