serve

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	StatusResponseKey request.Key = "ServeStatusResponse"
	CacheControlKey   request.Key = "Cache-Control"
)

Variables

This section is empty.

Functions

func GetCacheControl added in v0.2.8

func GetCacheControl(r *http.Request) (value string)

func GetServeStatus added in v0.2.2

func GetServeStatus(r *http.Request) (status int)

func Redirect

func Redirect(destination string, w http.ResponseWriter, r *http.Request)

func Serve204

func Serve204(w http.ResponseWriter, r *http.Request)

func Serve400 added in v0.2.2

func Serve400(w http.ResponseWriter, r *http.Request)

func Serve401

func Serve401(w http.ResponseWriter, r *http.Request)

func Serve403

func Serve403(w http.ResponseWriter, r *http.Request)

func Serve404

func Serve404(w http.ResponseWriter, r *http.Request)

func Serve405

func Serve405(w http.ResponseWriter, r *http.Request)

func Serve500

func Serve500(w http.ResponseWriter, r *http.Request)

func Serve502

func Serve502(w http.ResponseWriter, r *http.Request)

func Serve503

func Serve503(w http.ResponseWriter, r *http.Request)

func ServeBasic401

func ServeBasic401(w http.ResponseWriter, r *http.Request)

func SetCacheControl added in v0.2.8

func SetCacheControl(value string, w http.ResponseWriter, r *http.Request) (modified *http.Request)

func SetServeStatus added in v0.2.2

func SetServeStatus(status int, r *http.Request) (modified *http.Request)

func StatusHasBody added in v0.2.8

func StatusHasBody(status int) (allowed bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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