Nadia.HTTPDownloadRequest (nadia v1.6.0)

View Source

Streaming request passed to adapters that implement Nadia's optional download callback.

The URL contains the bot token. Conforming adapters must not log it, return it in errors, follow redirects, retry, buffer the response, or call sink after it returns an error. The sink enforces Nadia's destination byte limit.

Summary

Types

sink()

@type sink() :: (iodata() -> :ok | {:error, term()})

t()

@type t() :: %Nadia.HTTPDownloadRequest{
  expected_bytes: non_neg_integer() | nil,
  headers: list(),
  max_bytes: non_neg_integer(),
  method: :get,
  options: keyword(),
  sink: sink(),
  url: binary()
}