View Source Crawler.Fetcher.HeaderPreparer (Crawler v1.5.0)

Captures and prepares HTTP response headers.

Summary

Functions

Captures and prepares HTTP response headers.

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"}