decoder

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBodyTooLarge = errors.New("body too large")
View Source
var ErrInvalidJSON = errors.New("invalid json")

Functions

func DecodeJSONBody

func DecodeJSONBody(r *http.Request, out interface{}) error

DecodeJSONBody decodes a JSON body, returning ErrBodyTooLarge on MaxBytesError. DecodeJSONBody 解码 JSON body;需要上游设置限流才会返回 ErrBodyTooLarge。

Types

This section is empty.

Jump to

Keyboard shortcuts

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