net/http.Request.Method (field)
57 uses
net/http (current package)
client.go#L290: if resp.ContentLength > 0 && req.Method != "HEAD" {
client.go#L602: Op: urlErrorOp(req.Method),
client.go#L630: Op: urlErrorOp(reqs[0].Method),
client.go#L662: Method: redirectMethod,
client.go#L737: redirectMethod, shouldRedirect, includeBody = redirectBehavior(req.Method, resp, reqs[0])
fs.go#L352: if r.Method != "HEAD" {
fs.go#L487: if r.Method != "GET" && r.Method != "HEAD" {
fs.go#L508: if r.Method != "GET" && r.Method != "HEAD" {
fs.go#L581: if r.Method == "GET" || r.Method == "HEAD" {
h2_bundle.go#L6083: Method: rp.method,
h2_bundle.go#L6439: isHeadResp := rws.req.Method == "HEAD"
h2_bundle.go#L8308: isHead: req.Method == "HEAD",
h2_bundle.go#L8964: if req.Method != "CONNECT" {
h2_bundle.go#L9001: m := req.Method
h2_bundle.go#L9006: if req.Method != "CONNECT" {
h2_bundle.go#L9072: if http2shouldSendReqContentLength(req.Method, contentLength) {
request.go#L118: Method string
request.go#L508: return r.Method == "PRI" && len(r.Header) == 0 && r.URL.Path == "*" && r.Proto == "HTTP/2.0"
request.go#L627: } else if r.Method == "CONNECT" && r.URL.Path == "" {
request.go#L651: _, err = fmt.Fprintf(w, "%s %s HTTP/1.1\r\n", valueOrDefault(r.Method, "GET"), ruri)
request.go#L889: Method: method,
request.go#L1051: req.Method, req.RequestURI, req.Proto, ok = parseRequestLine(s)
request.go#L1055: if !validMethod(req.Method) {
request.go#L1056: return nil, badStringError("invalid method", req.Method)
request.go#L1072: justAuthority := req.Method == "CONNECT" && !strings.HasPrefix(rawurl, "/")
request.go#L1284: if r.Method == "POST" || r.Method == "PUT" || r.Method == "PATCH" {
request.go#L1442: switch valueOrDefault(r.Method, "GET") {
server.go#L377: if cw.res.req.Method == "HEAD" {
server.go#L1011: c.lastMethod = req.Method
server.go#L1016: if req.ProtoAtLeast(1, 1) && (!haveHost || len(hosts) == 0) && !isH2Upgrade && req.Method != "CONNECT" {
server.go#L1079: req.Method == "PRI" && req.RequestURI == "*" {
server.go#L1262: isHEAD := w.req.Method == "HEAD"
server.go#L1462: if w.req.Method == "HEAD" || !bodyAllowedForStatus(code) || code == StatusNoContent {
server.go#L1687: if w.req.Method != "HEAD" && w.contentLength != -1 && w.bodyAllowed() && w.contentLength != w.written {
server.go#L2239: if !hadCT && (r.Method == "GET" || r.Method == "HEAD") {
server.go#L2245: if !hadCT && r.Method == "GET" {
server.go#L2453: if r.Method == "CONNECT" {
server.go#L2934: if !sh.srv.DisableGeneralOptionsHandler && req.RequestURI == "*" && req.Method == "OPTIONS" {
transfer.go#L86: t.Method = valueOrDefault(rr.Method, "GET")
transfer.go#L112: t.Method = rr.Request.Method
transfer.go#L500: t.RequestMethod = rr.Request.Method
transfer.go#L504: t.RequestMethod = rr.Method
transport.go#L562: if req.Method != "" && !validMethod(req.Method) {
transport.go#L564: return nil, fmt.Errorf("net/http: invalid method %q", req.Method)
transport.go#L1691: Method: "CONNECT",
transport.go#L2158: hasBody := rc.req.Method != "HEAD" && resp.ContentLength != 0
transport.go#L2589: req.Method != "HEAD" {
go.uber.org/zap
http_handler.go#L88: switch r.Method {
nhooyr.io/websocket
accept.go#L179: if r.Method != "GET" {
accept.go#L180: return http.StatusMethodNotAllowed, fmt.Errorf("WebSocket protocol violation: handshake request method is not GET but %q", r.Method)
|
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |