View Source Membrane.Hackney.Source (Membrane Hackney plugin v0.11.0)
This module provides a source element allowing you to receive data as a client using HTTP. It is based upon Hackney library that is responsible for making HTTP requests.
See the t/0 for the available configuration options.
Element options
Passed via struct Membrane.Hackney.Source.t/0
locationanyRequired
The URL to fetch by the elementmethod:get | :post | :put | :patch | :delete | :head | :optionsDefault value:
:get
HTTP method that will be used when making a requestbodyanyDefault value:
""
The request bodyheadersanyDefault value:
[]
List of additional request headers in format accepted by:hackney.request/5hackney_optsanyDefault value:
[]
Additional options for Hackney in format accepted by:hackney.request/5max_retriesnon_neg_integer() | :infinityDefault value:
0
Maximum number of retries before returning an error. Can be set to:infinity.retry_delayanyDefault value:
1000000000
Delay between reconnection attempts in case of connection error.is_liveanyDefault value:
false
Assume the source is live. If true, when resuming after error, the element will not useRangeheader to skip to the current position in bytes.
Pads
:output
Accepted formats:
%RemoteStream{type: :bytestream, content_format: nil}| Direction: | :output |
| Availability: | :always |
| Flow control: | :manual |
| Demand unit: | nil |
Summary
Types
Struct containing options for Membrane.Hackney.Source
Types
@type t() :: %Membrane.Hackney.Source{ body: any(), hackney_opts: any(), headers: any(), is_live: any(), location: any(), max_retries: non_neg_integer() | :infinity, method: :get | :post | :put | :patch | :delete | :head | :options, retry_delay: any() }
Struct containing options for Membrane.Hackney.Source
Functions
@spec options() :: keyword()
Returns description of options available for this module