Crawler.Fetcher.HeaderPreparer (Crawler v1.1.2) View Source
Captures and prepares HTTP response headers.
Link to this section Summary
Functions
Captures and prepares HTTP response headers.
Link to this section Functions
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"}