Documentation ¶
Overview ¶
Package mx implements a HTTP request multiplexer. It is an internal package so that we can be able to add functionality to it that is used by ong, but cannot be called by third parties. Proper documentation for users should be added to github.com/komuw/ong/mux instead.
Index ¶
Constants ¶
View Source
const ( MethodAll = "ALL" MethodGet = http.MethodGet MethodHead = http.MethodHead MethodPost = http.MethodPost MethodPut = http.MethodPut MethodPatch = http.MethodPatch MethodDelete = http.MethodDelete MethodConnect = http.MethodConnect MethodOptions = http.MethodOptions MethodTrace = http.MethodTrace )
Common HTTP methods.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Muxer ¶
type Muxer struct {
// contains filtered or unexported fields
}
Muxer is a HTTP request multiplexer.
func (Muxer) AddRoute ¶
AddRoute adds a new Route to an existing Mux. This is only expected to be used internally by ong. Users of ong should not use this method. Instead, pass all your routes when calling New
func (Muxer) Resolve ¶
Resolve resolves a URL path to its corresponding Route and hence http handler.
Click to show internal directories.
Click to hide internal directories.