httputil

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(w http.ResponseWriter, res any) error

func MarshalJSON

func MarshalJSON(v any) ([]byte, error)

func Must

func Must(m bunrouter.H, err error) any

func UnmarshalJSON

func UnmarshalJSON(
	w http.ResponseWriter,
	req bunrouter.Request,
	dst any,
	maxBytes int64,
) error

Types

type DecompressHandler

type DecompressHandler struct {
	Next http.Handler
}

func (DecompressHandler) ServeHTTP

func (h DecompressHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type PanicHandler

type PanicHandler struct {
	Next http.Handler
}

func (PanicHandler) ServeHTTP

func (h PanicHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type SubpathHandler

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

func NewSubpathHandler

func NewSubpathHandler(next http.Handler, subpath string) *SubpathHandler

func (*SubpathHandler) ServeHTTP

func (h *SubpathHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type TraceparentHandler

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

func NewTraceparentHandler

func NewTraceparentHandler(next http.Handler) *TraceparentHandler

func (*TraceparentHandler) ServeHTTP

func (h *TraceparentHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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