コード例 #1
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Put returns a Pat route that only matches the PUT HTTP method.
*/
func Put(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "PUT")
}
コード例 #2
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Patch returns a Pat route that only matches the PATCH HTTP method.
*/
func Patch(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "PATCH")
}
コード例 #3
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Options returns a Pat route that only matches the OPTIONS HTTP method.
*/
func Options(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "OPTIONS")
}
コード例 #4
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Head returns a Pat route that only matches the HEAD HTTP method.
*/
func Head(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "HEAD")
}
コード例 #5
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Get returns a Pat route that only matches the GET and HEAD HTTP method. HEAD
requests are handled transparently by net/http.
*/
func Get(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "GET", "HEAD")
}
コード例 #6
0
ファイル: methods.go プロジェクト: metcalf/goji
/*
Delete returns a Pat route that only matches the DELETE HTTP method.
*/
func Delete(pat string) goji.Pattern {
	return pattern.WithMethods(New(pat), "DELETE")
}