httputil

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowCORS

func AllowCORS(w http.ResponseWriter, r *http.Request, allowMethods []string, allowCredentials bool)

func BearerAuth added in v0.8.0

func BearerAuth(r *http.Request) (string, bool)

func Cache

func Cache(w http.ResponseWriter, duration time.Duration)

func IsFormData added in v0.8.0

func IsFormData(contentType string) bool

func IsJSON added in v0.8.0

func IsJSON(contentType string) bool

func NoCache

func NoCache(w http.ResponseWriter)

func RedirectFragment

func RedirectFragment(w http.ResponseWriter, r *http.Request, url string, params url.Values)

func RedirectQuery

func RedirectQuery(w http.ResponseWriter, r *http.Request, url string, params url.Values)

Types

type Timing

type Timing struct {
	// contains filtered or unexported fields
}

func NewTiming

func NewTiming() *Timing

func (Timing) Report

func (t Timing) Report(w http.ResponseWriter)

func (*Timing) Start

func (t *Timing) Start(name string)

func (*Timing) Stop

func (t *Timing) Stop(name string)

Jump to

Keyboard shortcuts

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