Documentation ¶
Index ¶
Constants ¶
View Source
const ( OPTIONS httpMethod = iota GET HEAD POST PUT DELETE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncompleteRequest ¶
type IncompleteRequest struct {
MissingField string
}
Request misses fields (request-line or headers)
func (IncompleteRequest) Error ¶
func (err IncompleteRequest) Error() string
type InvalidOriginPolicy ¶
type InvalidOriginPolicy struct { Host string Origin string // contains filtered or unexported fields }
Request has a violated origin policy
func (InvalidOriginPolicy) Error ¶
func (err InvalidOriginPolicy) Error() string
type InvalidRequest ¶
invalid request - multiple-value if only 1 expected
func (InvalidRequest) Error ¶
func (err InvalidRequest) Error() string
type RequestLine ¶
type RequestLine struct {
// contains filtered or unexported fields
}
RequestLine represents the HTTP Request line defined in rfc-2616 : https://tools.ietf.org/html/rfc2616#section-5.1
func (*RequestLine) Parse ¶
func (r *RequestLine) Parse(b []byte) error
parseRequestLine parses the first HTTP request line
type T ¶
type T struct {
// contains filtered or unexported fields
}
T represents an HTTP Upgrade request
func Parse ¶
Parse builds an upgrade HTTP request from a reader (typically bufio.NewRead of the socket)
func (*T) BuildResponse ¶
BuildResponse builds a response.T from the request
func (T) StatusCode ¶
func (r T) StatusCode() response.StatusCode
StatusCode returns the status current
Source Files ¶
Click to show internal directories.
Click to hide internal directories.