httputil

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedMimetype = fmt.Errorf("Unsupported content type")

Functions

func Unmarshal

func Unmarshal(req *router.Request, entity interface{}, opts ...Option) error

Unmarshal requests with common entity types

func UnmarshalWithConfig added in v1.8.2

func UnmarshalWithConfig(req *router.Request, entity interface{}, conf Config) error

Unmarshal requests with common entity types:

  • application/json
  • application/x-www-form-urlencoded
  • multipart/form-data

Types

type Config added in v1.8.2

type Config struct {
	MaxMem int64
}

func (Config) WithOptions added in v1.8.2

func (c Config) WithOptions(opts []Option) Config

type Option added in v1.8.2

type Option func(Config) Config

func MaximumMemory added in v1.8.2

func MaximumMemory(v int64) Option

The maximum amount of memory that is permitted to buffer input data per request before it is offloaded to temporary disk storage. This is mainly only relevant to multipart file data.

Jump to

Keyboard shortcuts

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