pub struct HttpInputBuilder { /* private fields */ }Expand description
Builder for HttpInput.
Implementations§
Source§impl HttpInputBuilder
impl HttpInputBuilder
Sourcepub fn header(
self,
name: impl Into<String>,
value: impl Into<String>,
) -> Result<Self, HttpInputError>
pub fn header( self, name: impl Into<String>, value: impl Into<String>, ) -> Result<Self, HttpInputError>
Extra origin header. Reserved names (Range, Accept-Encoding, …) fail.
Sourcepub fn user_agent(self, ua: impl Into<String>) -> Self
pub fn user_agent(self, ua: impl Into<String>) -> Self
Override User-Agent for this input.
Sourcepub fn disable_user_agent(self) -> Self
pub fn disable_user_agent(self) -> Self
Send no User-Agent on this input.
Sourcepub fn timeouts(self, timeouts: HttpTimeouts) -> Self
pub fn timeouts(self, timeouts: HttpTimeouts) -> Self
Per-input response-header and body-idle timeouts. Zero durations are
rejected. Connect timeout is a client-level setting: exclusive builders
apply it when the hidden client is created; a shared HttpClient
keeps the connect budget from HttpClientBuilder::timeouts.
Sourcepub fn read_idle_timeout(self, idle: Duration) -> Self
pub fn read_idle_timeout(self, idle: Duration) -> Self
Body idle timeout convenience (see HttpTimeouts::read_idle).
Sourcepub fn reconnect(self, policy: ReconnectPolicy) -> Self
pub fn reconnect(self, policy: ReconnectPolicy) -> Self
Reconnect policy. Default is off (FFmpeg reconnect=0).
For a seekable file, ReconnectPolicy::seekable_default enables a
conservative retry budget and still requires an ETag or Last-Modified
unless require_validator is set false. For a non-seekable live
stream of unknown length, use ReconnectPolicy::streamed_default
(a hand-built policy with only reconnect_streamed set never
matches a resumable case and is a no-op).
Sourcepub fn io_buffer_size(self, size: usize) -> Self
pub fn io_buffer_size(self, size: usize) -> Self
AVIO buffer size (same contract as Input::set_io_buffer_size).
This sizes FFmpeg’s read buffer only. The network read-ahead between the HTTP worker and AVIO is a fixed bounded queue (8 events of at most 64 KiB each, about 512 KiB) and is not configurable.
Sourcepub fn build(self) -> Result<HttpInput, HttpInputError>
pub fn build(self) -> Result<HttpInput, HttpInputError>
Validate configuration. No network I/O.