DdDataStreams.Transport.Req (DD Data Streams v0.3.0)

Copy Markdown View Source

The default agent transport, backed by Req.

Req is an optional dependency, so this module is compiled only when it is available; an application that supplies its own transport does not pull in an HTTP client.

Only options Req has accepted since 0.5 are used, because mix.exs allows any Req ~> 0.5: an option a version does not know makes Req raise ArgumentError instead of posting. :request_timeout is the example - Req added it in 0.7.0 - so the hard deadline on the whole request is enforced with Task.yield/2 below rather than with that option.