Membrane Element: Hackney v0.3.1 Membrane.Element.Hackney.Source View Source
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.Element.Hackney.Source.t/0
locationRequired
The URL to fetch by the element
methodDefault value:
:getHTTP method that will be used when making a request
bodyDefault value:
""The request body
headersDefault value:
[]List of additional request headers in format accepted by
:hackney.request/5hackney_optsDefault value:
[]Additional options for Hackney in format accepted by
:hackney.request/5max_retriesDefault value:
0Maximum number of retries before returning an error. Can be set to
:infinity.retry_delayDefault value:
1 |> Membrane.Time.seconds()Delay between reconnection attempts in case of connection error.
is_liveDefault value:
falseAssume the source is live. If true, when resuming after error, the element will not use
Rangeheader to skip to the current position in bytes.
Pads
:output
| Availability | :always |
| Bin? | false |
| Caps | :any |
| Direction | :output |
| Mode | :pull |
| Name | :output |
Link to this section Summary
Types
Struct containing options for Membrane.Element.Hackney.Source
Functions
Returns pads descriptions for Membrane.Element.Hackney.Source
Returns description of options available for this module
Link to this section Types
t()
View Sourcet() :: %Membrane.Element.Hackney.Source{
body: String.t(),
hackney_opts: keyword(),
headers: keyword(),
is_live: boolean(),
location: String.t(),
max_retries: non_neg_integer() | :infinity,
method: :get | :post | :put | :patch | :delete | :head | :options,
retry_delay: Membrane.Time.t()
}
Struct containing options for Membrane.Element.Hackney.Source
Link to this section Functions
membrane_pads()
View Sourcemembrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.Element.Hackney.Source
Returns description of options available for this module