Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// MaxRequestBodySize limits the maximum number of bytes for the request body.
// Default 4194304 (4MB) if not specified or set to 0.
MaxRequestBodySize int64 `json:"max_request_body_size" mapstructure:"max_request_body_size"`
}
Config holds the configuration for the buffering middleware.
type Middleware ¶ added in v0.10.0
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is a middleware that buffers the request body.
func NewMiddleware ¶
func NewMiddleware(config Config) *Middleware
NewMiddleware creates a new BufferingMiddleware instance.
func (*Middleware) ServeHTTP ¶ added in v0.10.0
func (m *Middleware) ServeHTTP(ctx context.Context, c *app.RequestContext)
Click to show internal directories.
Click to hide internal directories.