Documentation
¶
Overview ¶
Package body provides HTTP request body parsing with Content-Type handling.
Index ¶
Constants ¶
View Source
const MaxBodySize = 10 * 1024 * 1024
MaxBodySize is the maximum allowed request body size (10MB).
Variables ¶
View Source
var ( ErrUnsupportedMediaType = errors.New("unsupported media type") ErrBadRequest = errors.New("bad request") ErrBodyTooLarge = errors.New("request body too large") )
Error types
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses HTTP request bodies based on Content-Type.
func NewParser ¶
func NewParser(accepts []config.AcceptType) *Parser
NewParser creates a new Parser with the given accepted types.
Click to show internal directories.
Click to hide internal directories.