Req.Response (req v0.2.1) View Source

The response struct.

Fields:

  • :status - the HTTP status code

  • :headers - the HTTP response headers

  • :body - the HTTP response body

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

Assigns a private key to value.

Link to this section Functions

Link to this function

get_private(response, key, default \\ nil)

View Source

Gets the value for a specific private key.

Link to this function

put_private(response, key, value)

View Source

Assigns a private key to value.