Req.Request (req v0.1.0) View Source

The Request pipeline struct.

Fields:

  • :method - the HTTP request method

  • :uri - the HTTP request URI

  • :headers - the HTTP request headers

  • :body - the HTTP request body

  • :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.

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.