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

# Functions

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.
NewClientWithTimeout defines a http.Client with the given timeout.
NewRequestWithContext aliases http.NewRequestWithContext.
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.
PostJSONWithRequest uses the supplied client to POST request to the URL specified by the parameters and unmarshals the result into response.

# 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.
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.

# 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.