Documentation
¶
Overview ¶
Package constants defines protocol and method constants.
Index ¶
Constants ¶
View Source
const ( MethodGET = "GET" MethodPOST = "POST" MethodPUT = "PUT" MethodDELETE = "DELETE" MethodPATCH = "PATCH" MethodHEAD = "HEAD" MethodOPTIONS = "OPTIONS" )
HTTP methods
View Source
const ( TransportHTTP = "http" TransportGRPC = "grpc" TransportTCP = "tcp" TransportGraphQL = "graphql" )
Transport types
Variables ¶
View Source
var ValidHTTPMethods = map[string]bool{ MethodGET: true, MethodPOST: true, MethodPUT: true, MethodDELETE: true, MethodPATCH: true, MethodHEAD: true, MethodOPTIONS: true, }
ValidHTTPMethods contains all valid HTTP verbs for validation
Functions ¶
func CanonicalizeMethod ¶
CanonicalizeMethod returns canonical uppercase method name.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.