Documentation
¶
Overview ¶
Package http is the HTTP(S) JSON transport: GET requests only, basic and digest authentication, no redirects to other hosts, per-request timeouts and backoff after failures (spec 4.4, 10). It never sends anything but GET.
Index ¶
Constants ¶
const ( AuthNone = "" AuthBasic = "basic" AuthDigest = "digest" )
Authentication schemes.
const ( BackoffMin = time.Second BackoffMax = 30 * time.Second MaxBodySize = 1 << 20 // 1 MiB )
Backoff bounds and response limit.
Variables ¶
var ( ErrStatus = errors.New("http: unexpected status") ErrRedirect = errors.New("http: redirect to another host refused") )
Errors returned by Get.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the HTTP transport of one device. Get is called by one goroutine at a time (the collector of the connection).