context

package
v0.9.22 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CtxBodyKey is the context key for the body
	CtxBodyKey = "body"
)

Variables

View Source
var (
	ErrMissingBodyInContext = errors.New("missing body in context")
)

Functions

func GetCtxBody

func GetCtxBody(r *http.Request) interface{}

GetCtxBody tries to get the body from the context

func SetCtxBody

func SetCtxBody(r *http.Request, body interface{}) *http.Request

SetCtxBody sets the body in the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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