middleware

package
v0.0.0-...-22f70c5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestIDHeader = "X-Request-Id"

RequestIDHeader is the name of the HTTP Header which contains the request id.

Functions

func Accept

func Accept(accepted ...string) func(next http.Handler) http.Handler

Accept generates a handler that writes a 415 Unsupported Media Type header if the request's Accept header does not match the provided media type.

func ContentType

func ContentType(accepted ...string) func(next http.Handler) http.Handler

ContentType generates a handler that writes a 415 Unsupported Media Type header if the request's Content-Type header does not match the provided media type.

func RequestID

func RequestID(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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