net/http.Request.Method (field)

65 uses

	net/http (current package)
		client.go#L294: 		if resp.ContentLength > 0 && req.Method != "HEAD" {
		client.go#L604: 			Op:  urlErrorOp(req.Method),
		client.go#L634: 			Op:  urlErrorOp(reqs[0].Method),
		client.go#L666: 				Method:   redirectMethod,
		client.go#L743: 		redirectMethod, shouldRedirect, includeBodyOnHop = redirectBehavior(req.Method, resp, reqs[0])
		clientconn.go#L135: 			Method: "GET",
		clientconn.go#L229: 	if req.Method != "" && !validMethod(req.Method) {
		clientconn.go#L230: 		return fmt.Errorf("http: invalid method %q", req.Method)
		csrf.go#L135: 	switch req.Method {
		fs.go#L428: 	if r.Method != "HEAD" {
		fs.go#L563: 	if r.Method != "GET" && r.Method != "HEAD" {
		fs.go#L584: 	if r.Method != "GET" && r.Method != "HEAD" {
		fs.go#L657: 		if r.Method == "GET" || r.Method == "HEAD" {
		h2_bundle.go#L6304: 		Method:     rp.Method,
		h2_bundle.go#L6657: 	isHeadResp := rws.req.Method == "HEAD"
		h2_bundle.go#L8612: 		isHead:               req.Method == "HEAD",
		h2_bundle.go#L8622: 	cs.requestedGzip = httpcommon.IsRequestGzip(req.Method, req.Header, cc.t.disableCompression())
		h2_bundle.go#L8738: 	if req.Method == "CONNECT" && req.Header.Get(":protocol") != "" {
		h2_bundle.go#L8922: 			Method:              req.Method,
		request.go#L116: 	Method string
		request.go#L530: 	return r.Method == "PRI" && len(r.Header) == 0 && r.URL.Path == "*" && r.Proto == "HTTP/2.0"
		request.go#L649: 	} else if r.Method == "CONNECT" && r.URL.Path == "" {
		request.go#L673: 	_, err = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(r.Method, "GET"), ruri)
		request.go#L914: 		Method:     method,
		request.go#L1097: 	req.Method, req.RequestURI, req.Proto, ok = parseRequestLine(s)
		request.go#L1101: 	if !validMethod(req.Method) {
		request.go#L1102: 		return nil, badStringError("invalid method", req.Method)
		request.go#L1118: 	justAuthority := req.Method == "CONNECT" && !strings.HasPrefix(rawurl, "/")
		request.go#L1330: 		if r.Method == "POST" || r.Method == "PUT" || r.Method == "PATCH" {
		request.go#L1536: 		switch valueOrDefault(r.Method, "GET") {
		servemux121.go#L107: 	if r.Method == "CONNECT" {
		server.go#L380: 	if cw.res.req.Method == "HEAD" {
		server.go#L617: 	if !w.cw.chunking && w.bodyAllowed() && w.req.Method != "HEAD" {
		server.go#L1017: 	c.lastMethod = req.Method
		server.go#L1022: 	if req.ProtoAtLeast(1, 1) && (!haveHost || len(hosts) == 0) && !isH2Upgrade && req.Method != "CONNECT" {
		server.go#L1084: 		req.Method == "PRI" && req.RequestURI == "*" {
		server.go#L1266: 	isHEAD := w.req.Method == "HEAD"
		server.go#L1477: 	if w.req.Method == "HEAD" || !bodyAllowedForStatus(code) || code == StatusNoContent {
		server.go#L1697: 	if w.req.Method != "HEAD" && w.contentLength != -1 && w.bodyAllowed() && w.contentLength != w.written {
		server.go#L2410: 	if !hadCT && (r.Method == "GET" || r.Method == "HEAD") {
		server.go#L2416: 	if !hadCT && r.Method == "GET" {
		server.go#L2665: 	if r.Method == "CONNECT" {
		server.go#L2669: 		_, _, u := mux.matchOrRedirect(host, r.Method, path, r.URL)
		server.go#L2675: 		n, matches, _ = mux.matchOrRedirect(r.Host, r.Method, path, nil)
		server.go#L2685: 		n, matches, u = mux.matchOrRedirect(host, r.Method, path, r.URL)
		server.go#L3307: 	if !sh.srv.DisableGeneralOptionsHandler && req.RequestURI == "*" && req.Method == "OPTIONS" {
		transfer.go#L88: 		t.Method = valueOrDefault(rr.Method, "GET")
		transfer.go#L114: 			t.Method = rr.Request.Method
		transfer.go#L505: 			t.RequestMethod = rr.Request.Method
		transfer.go#L509: 		t.RequestMethod = rr.Method
		transport.go#L636: 	if req.Method != "" && !validMethod(req.Method) {
		transport.go#L638: 		return nil, fmt.Errorf("net/http: invalid method %q", req.Method)
		transport.go#L1881: 			Method: "CONNECT",
		transport.go#L2370: 		hasBody := rc.treq.Request.Method != "HEAD" && resp.ContentLength != 0
		transport.go#L2844: 		req.Method != "HEAD" {

	github.com/coder/websocket
		accept.go#L201: 	if r.Method != "GET" {
		accept.go#L202: 		return http.StatusMethodNotAllowed, fmt.Errorf("WebSocket protocol violation: handshake request method is not GET but %q", r.Method)