MCPcopy
hub / github.com/perkeep/perkeep / HTTPVersion

Method HTTPVersion

pkg/client/client.go:1020–1027  ·  view source on GitHub ↗

HTTPVersion reports the HTTP version in use, such as "HTTP/1.1" or "HTTP/2.0".

(ctx context.Context)

Source from the content-addressed store, hash-verified

1018
1019// HTTPVersion reports the HTTP version in use, such as "HTTP/1.1" or "HTTP/2.0".
1020func (c *Client) HTTPVersion(ctx context.Context) (string, error) {
1021 req := c.newRequest(ctx, "HEAD", c.discoRoot(), nil)
1022 res, err := c.doReqGated(req)
1023 if err != nil {
1024 return "", err
1025 }
1026 return res.Proto, err
1027}
1028
1029func (c *Client) discoveryResp(ctx context.Context) (*http.Response, error) {
1030 // If the path is just "" or "/", do discovery against

Callers 1

RunCommandMethod · 0.80

Calls 3

newRequestMethod · 0.95
discoRootMethod · 0.95
doReqGatedMethod · 0.95

Tested by

no test coverage detected