Req.Request (req v0.2.1) View Source

The request pipeline struct.

Fields:

  • :method - the HTTP request method

  • :url - the HTTP request URL

  • :headers - the HTTP request headers

  • :body - the HTTP request body

  • :unix_socket - if set, connect through the given UNIX domain socket

  • :halted - whether the request pipeline is halted. See halt/1

  • :request_steps - the list of request steps

  • :response_steps - the list of response steps

  • :error_steps - the list of error steps

  • :private - a map reserved for libraries and frameworks to use. Prefix the keys with the name of your project to avoid any future conflicts. Only accepts atom/0 keys.

Link to this section Summary

Functions

Gets the value for a specific private key.

Halts the request pipeline preventing any further steps from executing.

Assigns a private key to value.

Link to this section Functions

Link to this function

get_private(request, key, default \\ nil)

View Source

Gets the value for a specific private key.

Halts the request pipeline preventing any further steps from executing.

Link to this function

put_private(request, key, value)

View Source

Assigns a private key to value.