package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

ComputeEtags recursively computes the SHA1 hash of every file in fsys starting at root, and stores the computed hashes in dest["/path/to/file"] (*including* a leading "/") for later use as an ETag response header.
Delete is like http.Delete but uses the provided context and obeys its cancellation.
EtagHandler creates an http.Handler middleware that wraps another HTTP handler, adding support for the If-None-Match request header and ETag response header based on pre-computed file hashes.
Get does like http.Get but uses the provided context and obeys its cancellation.
GetJSON uses the supplied client to GET the URL specified by the parameters and unmarshals the result into response.
Head does like http.Head but uses the provided context and obeys its cancellation.
NewClient defines a new http.Client as per the provided options.
NewClientWithTimeout defines a http.Client with the given timeout.
Post
Post does like http.Post but uses the provided context and obeys its cancellation.
PostJSON uses the supplied client to POST request to the URL specified by the parameters and unmarshals the result into response.
PostJSONRaw uses the supplied client to POST request to the URL specified by the parameters and returns the response.
PostJSONWithRequest uses the supplied client to POST request to the URL specified by the parameters and unmarshals the result into response.
PostProtobuf uses the supplied client to POST request to the URL specified by the parameters and unmarshal the result into response, using a protobuf-encoded request body.
Put is like http.Put but uses the provided context and obeys its cancellation.
WithClientTimeout sets the client timeout for the http.Client.
WithCustomCAPEM sets the custom root CA for the http.Client.
WithDialerTimeout sets the dialer timeout for the http.Client.

# Constants

AcceptEncodingHeader is the canonical header name for accept encoding.
AcceptHeader is the canonical header name for accept.
AltJSONContentType is the alternate JSON content type.
AltProtoContentType is the alternate protobuf content type.
ContentDispositionHeader is the canonical header name for content disposition.
ContentEncodingHeader is the canonical header name for content type.
ContentTypeHeader is the canonical header name for content type.
GzipEncoding is the gzip encoding.
JSONContentType is the JSON content type.
PlaintextContentType is the plaintext content type.
ProtoContentType is the protobuf content type.
StandardHTTPTimeout is the default timeout to use for HTTP connections.

# Variables

DefaultClient is a replacement for http.DefaultClient which defines a standard timeout.

# Structs

Client is a replacement for http.Client which implements method variants that respect a provided context's cancellation status.

# Interfaces

ClientOption overrides behavior of NewClient.

# Type aliases