request

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.1.2

func New[T any](m mapper[T]) *request[T]

func UnJSONify

func UnJSONify(r *http.Request, dst any, opts ...Option) error

UnJSONify decodes the request body into the given destination.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is an option for the request package.

type OptionFunc

type OptionFunc func(*options)

OptionFunc is a function that implements the Option interface.

func WithByteLimitReader

func WithByteLimitReader(w http.ResponseWriter) OptionFunc

WithByteLimitReader sets the byteReadLimiter option which limits the number of bytes that can be read from the request body to the default value of 1MB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL