http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultServeMux = NewServeMux()

Functions

This section is empty.

Types

type Pattern

type Pattern []string

POST /servers/<ServerId>/action => []string{"POST", "servers", "*", "action"}

func NewPattern

func NewPattern(pattern string) Pattern

"POST /servers/*/action"

func (Pattern) Match

func (p Pattern) Match(method string, cmds []string) (args []string, ok bool)

type ServeMux

type ServeMux struct {
	// contains filtered or unexported fields
}

func NewServeMux

func NewServeMux() *ServeMux

func (*ServeMux) Handle

func (h *ServeMux) Handle(pattern string, handler http.Handler)

func (*ServeMux) HandleFunc

func (h *ServeMux) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*ServeMux) ServeHTTP

func (h *ServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*ServeMux) SetDefault

func (h *ServeMux) SetDefault(handler http.Handler)

Jump to

Keyboard shortcuts

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