Crawly v0.9.0 Crawly.Request 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

Link to this type

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

Link to this type

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

Link to this type

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

Link to this section Functions

Link to this function

new(url, headers \\ [], options \\ []) View Source
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
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.