httpparser

package
v0.0.0-...-2680af6 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequestBody

func RequestBody(w http.ResponseWriter, r *http.Request, dst any) (int, error)

func RequestQuery

func RequestQuery(r *http.Request, dst any) error

func RouteParams

func RouteParams(r *http.Request, key string, dst any) error

Types

type MalformedError

type MalformedError struct {
	// contains filtered or unexported fields
}

https://www.alexedwards.net/blog/how-to-properly-parse-a-json-request-body

func (*MalformedError) Error

func (mr *MalformedError) Error() string

func (*MalformedError) Status

func (mr *MalformedError) Status() int

Jump to

Keyboard shortcuts

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