Crawler v0.3.1 Crawler.Fetcher.HeaderPreparer
Captures and prepares HTTP response headers.
Link to this section Summary
Functions
Captures and prepares HTTP response headers
Link to this section Functions
Link to this function
prepare(headers, opts)
Captures and prepares HTTP response headers.
Examples
iex> HeaderPreparer.prepare(
iex> [{"Content-Type", "text/html"}],
iex> %{}
iex> )
%{headers: [{"Content-Type", "text/html"}], content_type: "text/html"}
iex> HeaderPreparer.prepare(
iex> [{"Content-Type", "text/css"}],
iex> %{}
iex> )
%{headers: [{"Content-Type", "text/css"}], content_type: "text/css"}
iex> HeaderPreparer.prepare(
iex> [{"Content-Type", "image/png; blah"}],
iex> %{}
iex> )
%{headers: [{"Content-Type", "image/png; blah"}], content_type: "image/png"}