From: Brad Fitzpatrick Date: Thu, 12 Nov 2015 15:33:23 +0000 (+0000) Subject: net/http: add method constants X-Git-Tag: go1.6beta1~469 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0b314e1af98689443772ff3b9ee00db3fced94d0;p=gostls13.git net/http: add method constants Fixes #12078 Change-Id: Ia8738123b07ca29be4a0cf400ee143729c8b5b3c Reviewed-on: https://go-review.googlesource.com/16860 Reviewed-by: Andrew Gerrand Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/net/http/method.go b/src/net/http/method.go new file mode 100644 index 0000000000..b74f9604d3 --- /dev/null +++ b/src/net/http/method.go @@ -0,0 +1,20 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http + +// Common HTTP methods. +// +// Unless otherwise noted, these are defined in RFC 7231 section 4.3. +const ( + MethodGet = "GET" + MethodHead = "HEAD" + MethodPost = "POST" + MethodPut = "PUT" + MethodPatch = "PATCH" // RFC 5741 + MethodDelete = "DELETE" + MethodConnect = "CONNECT" + MethodOptions = "OPTIONS" + MethodTrace = "TRACE" +)