request

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderAccept      = "Accept"
	HeaderContentType = "Content-Type"

	ContentTypeHtml   = "text/html"
	ContentTypeJson   = "application/json"
	ContentTypeBinary = "application/octet-stream"
)

Variables

This section is empty.

Functions

func IsJSONRequest

func IsJSONRequest(ctx *gin.Context) bool

IsJSONRequest returns true if request is a JSON request

func ValidOrigin

func ValidOrigin(origin string, protocols []string) bool

ValidOrigin returns true if origin is valid

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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