Re: net/http: add method constants from RFC 2616. (issue 134550043 by andybons@chromium.org)

259 views
Skip to first unread message

Andy Bonventre

unread,
Dec 1, 2014, 9:55:25 AM12/1/14
to Brad Fitzpatrick, andy...@chromium.org, golang-co...@googlegroups.com, re...@codereview-hr.appspotmail.com, golan...@googlegroups.com
Following up on this.
On Wed, Nov 12, 2014 at 1:01 PM Andy Bonventre <andy...@gmail.com> wrote:
Sounds good. Will ping around Dec 1 assuming the tree is back open. Thanks for taking a look, Brad.

On Wed Nov 12 2014 at 1:00:35 PM Brad Fitzpatrick <brad...@golang.org> wrote:
Sorry, I missed this CL earlier. The tree is closed in any case.

Please ping this thread after Go 1.4 is out (and copy golang-dev@ in this case), around December 1st, and we can discuss. I could go either on this. Others may have opinions.


On Wed, Oct 1, 2014 at 2:32 AM, <andy...@chromium.org> wrote:
Reviewers: bradfitz,

Description:
net/http: add method constants from RFC 2616.

As defined in http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

Please review this at https://codereview.appspot.com/134550043/

Affected files (+18, -0 lines):
  A src/pkg/net/http/methods.go


Index: src/pkg/net/http/methods.go
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/pkg/net/http/methods.go
@@ -0,0 +1,18 @@
+// Copyright 2014 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
+
+// HTTP methods, defined in RFC 2616.
+const (
+       MethodHead   = "HEAD"
+       MethodGet    = "GET"
+       MethodPut    = "PUT"
+       MethodPost   = "POST"
+       MethodDelete = "DELETE"
+
+       MethodConnect = "CONNECT"
+       MethodOptions = "OPTIONS"
+       MethodTrace   = "TRACE"
+)



Brad Fitzpatrick

unread,
Dec 1, 2014, 12:25:09 PM12/1/14
to Andy Bonventre, andy...@chromium.org, golang-co...@googlegroups.com, re...@codereview-hr.appspotmail.com, golan...@googlegroups.com
Let's wait until things have moved to Github.

Andy Bonventre

unread,
Dec 1, 2014, 12:35:59 PM12/1/14
to Brad Fitzpatrick, andy...@chromium.org, golang-co...@googlegroups.com, re...@codereview-hr.appspotmail.com, golan...@googlegroups.com
Sounds good.
Reply all
Reply to author
Forward
0 new messages