package
0.19.1
Repository: https://github.com/noxecane/anansi.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
AttachLogger attaches a new zerolog.Logger to each new HTTP request.
CORS sets CORS for the handler based on the app environment, making the rules lax in dev environment.
FormData is QueryParams for x-www-form-urlencoded.
IDParam extracts a uint URL parameter from the given request.
Log updates a future log entry with the request parameters such as request ID and headers.
MultipartFormData converts the non-files in the form data of the request into a struct using the "json" tag to map the keys.
QueryParams converts the query values of the request into a struct using the "json" tag to map the keys.
ReadBody extracts the bytes in a request body without destroying the contents of the body.
ReadJSON decodes the JSON body of the request and destroys it to prevent possible issues with writing a response.
StringParam basically just ensures the param name is correct.
Timeout is a middleware that cancels ctx after a given timeout and return a 504 Gateway Timeout error to the client.

# Variables

No description provided by the author