Documentation
¶
Overview ¶
Package methods provides functionality for handling HTTP methods
Index ¶
- Constants
- func AllHTTPMethods() []string
- func AreEqual(l1, l2 []string) bool
- func CacheableHTTPMethods() []string
- func GetAndPost() []string
- func HasAll(methods1, methods2 []string) bool
- func HasAny(methods1, methods2 []string) bool
- func HasBody(method string) bool
- func IsCacheable(method string) bool
- func IsValidMethod(method string) bool
- func MethodMask(methods ...string) uint16
- func UncacheableHTTPMethods() []string
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 GetAndPost ¶
func GetAndPost() []string
GetAndPost returns a string slice containing "GET" and "POST"
func IsCacheable ¶
IsCacheable returns true if the method is HEAD or GET
func IsValidMethod ¶
IsValidMethod returns true if the provided method is recognized in methodsMap
func MethodMask ¶
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.
Click to show internal directories.
Click to hide internal directories.