httpx

package
v0.0.0-...-421433b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJSON

func DecodeJSON(r *http.Request, v any) error

func Logger

func Logger(next http.Handler) http.Handler

Logger is a middleware that injects a zerolog.Logger into the context, and logs the request with method, path, status, and duration.

func MaxBodyBytes

func MaxBodyBytes(max int64) func(http.Handler) http.Handler

func ReturnError

func ReturnError(ctx context.Context, w http.ResponseWriter, returningErr error)

func WriteJSON

func WriteJSON(ctx context.Context, w http.ResponseWriter, status int, v any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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