Crawly.Request (Crawly v0.17.2) View Source

Request wrapper

Defines Crawly request structure.

Link to this section Summary

Functions

Create new Crawly.Request from url, headers and options

Same as Crawly.Request.new/3 from but allows to specify middlewares as the 4th parameter.

Link to this section Types

Specs

header() :: {key(), value()}

Specs

option() :: {atom(), binary()}

Specs

t() :: %Crawly.Request{
  headers: [header()],
  middlewares: [atom()],
  options: [option()],
  prev_response: %{},
  retries: non_neg_integer(),
  url: url()
}

Specs

url() :: binary()

Link to this section Functions

Link to this function

new(url, headers \\ [], options \\ [])

View Source

Specs

new(url, headers, options) :: request
when url: binary(), headers: [term()], options: [term()], request: t()

Create new Crawly.Request from url, headers and options

Link to this function

new(url, headers, options, middlewares)

View Source

Specs

new(url, headers, options, middlewares) :: request
when url: binary(),
     headers: [term()],
     options: [term()],
     middlewares: [term()],
     request: t()

Same as Crawly.Request.new/3 from but allows to specify middlewares as the 4th parameter.