methods

package
v1.1.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package methods provides functionality for handling HTTP methods

Index

Constants

View Source
const (

	// MethodPurge is the PURGE HTTP Method
	MethodPurge = "PURGE"
)

Variables

This section is empty.

Functions

func AllHTTPMethods

func AllHTTPMethods() []string

AllHTTPMethods returns a list of all known HTTP methods

func CacheableHTTPMethods

func CacheableHTTPMethods() []string

CacheableHTTPMethods returns a list of HTTP methods that are generally considered cacheable

func HasBody

func HasBody(method string) bool

HasBody returns true if the method is POST, PUT or PATCH

func IsCacheable

func IsCacheable(method string) bool

IsCacheable returns true if the method is HEAD or GET

func MethodMask added in v1.1.1

func MethodMask(methods ...string) uint16

MethodMask returns the integer representation of the collection of methods based on the iota bitmask defined above

func UncacheableHTTPMethods

func UncacheableHTTPMethods() []string

UncacheableHTTPMethods returns a list of HTTP methods that are generally considered uncacheable

Types

This section is empty.

Jump to

Keyboard shortcuts

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