net/http.Request.Method (field)
72 uses
net/http (current package)
client.go#L289: if resp.ContentLength > 0 && req.Method != "HEAD" {
client.go#L599: Op: urlErrorOp(req.Method),
client.go#L629: Op: urlErrorOp(reqs[0].Method),
client.go#L661: Method: redirectMethod,
client.go#L738: redirectMethod, shouldRedirect, includeBodyOnHop = redirectBehavior(req.Method, resp, reqs[0])
fs.go#L423: if r.Method != "HEAD" {
fs.go#L558: if r.Method != "GET" && r.Method != "HEAD" {
fs.go#L579: if r.Method != "GET" && r.Method != "HEAD" {
fs.go#L652: if r.Method == "GET" || r.Method == "HEAD" {
h2_bundle.go#L6418: Method: rp.method,
h2_bundle.go#L6774: isHeadResp := rws.req.Method == "HEAD"
h2_bundle.go#L8776: isHead: req.Method == "HEAD",
h2_bundle.go#L8925: if req.Method == "CONNECT" && req.Header.Get(":protocol") != "" {
h2_bundle.go#L9533: if req.Method == "CONNECT" && protocol == "" {
h2_bundle.go#L9535: } else if protocol != "" && req.Method != "CONNECT" {
h2_bundle.go#L9572: m := req.Method
h2_bundle.go#L9649: if http2shouldSendReqContentLength(req.Method, contentLength) {
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#L378: if cw.res.req.Method == "HEAD" {
server.go#L614: if !w.cw.chunking && w.bodyAllowed() && w.req.Method != "HEAD" {
server.go#L1060: c.lastMethod = req.Method
server.go#L1065: if req.ProtoAtLeast(1, 1) && (!haveHost || len(hosts) == 0) && !isH2Upgrade && req.Method != "CONNECT" {
server.go#L1128: req.Method == "PRI" && req.RequestURI == "*" {
server.go#L1310: isHEAD := w.req.Method == "HEAD"
server.go#L1521: if w.req.Method == "HEAD" || !bodyAllowedForStatus(code) || code == StatusNoContent {
server.go#L1741: if w.req.Method != "HEAD" && w.contentLength != -1 && w.bodyAllowed() && w.contentLength != w.written {
server.go#L2416: if !hadCT && (r.Method == "GET" || r.Method == "HEAD") {
server.go#L2422: if !hadCT && r.Method == "GET" {
server.go#L2666: if r.Method == "CONNECT" {
server.go#L2670: _, _, u := mux.matchOrRedirect(host, r.Method, path, r.URL)
server.go#L2676: n, matches, _ = mux.matchOrRedirect(r.Host, r.Method, path, nil)
server.go#L2686: n, matches, u = mux.matchOrRedirect(host, r.Method, path, r.URL)
server.go#L3297: 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#L628: if req.Method != "" && !validMethod(req.Method) {
transport.go#L630: return nil, fmt.Errorf("net/http: invalid method %q", req.Method)
transport.go#L1846: Method: "CONNECT",
transport.go#L2315: hasBody := rc.treq.Request.Method != "HEAD" && resp.ContentLength != 0
transport.go#L2759: req.Method != "HEAD" {
net/http/httputil
dump.go#L243: fmt.Fprintf(&b, "%s %s HTTP/%d.%d\r\n", valueOrDefault(req.Method, "GET"),
net/http/pprof
pprof.go#L210: if r.Method == "POST" {
go.uber.org/zap
http_handler.go#L88: switch r.Method {
golang.org/x/net/http2
server.go#L2307: Method: rp.Method,
server.go#L2660: isHeadResp := rws.req.Method == "HEAD"
transport.go#L1273: isHead: req.Method == "HEAD",
transport.go#L1283: cs.requestedGzip = httpcommon.IsRequestGzip(req.Method, req.Header, cc.t.disableCompression())
transport.go#L1399: if req.Method == "CONNECT" && req.Header.Get(":protocol") != "" {
transport.go#L1583: Method: req.Method,
google.golang.org/grpc/internal/transport
handler_server.go#L54: if r.Method != http.MethodPost {
handler_server.go#L56: msg := fmt.Sprintf("invalid gRPC request method %q", r.Method)
proxy.go#L65: Method: http.MethodConnect,