Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertStatusCode ¶
Types ¶
type Request ¶
type Request struct {
Method string
URL string
// Query defines additional query parameters
// If url already has some and Query is defined, they will be added together
Query url.Values
Header http.Header
// Body is sent to the server.
Body []byte
// BodyReader is sent to the server.
// Use for large files.
// Need to be careful for concurrent use.
// When Request is called seeks to beginning.
BodyReader io.ReadSeeker
BasicAuthUser string
BasicAuthPassword string
}
func NewRequest ¶
func NewRequest() Request
type Requests ¶
type Requests struct {
Logger hclog.Logger
Client *http.Client
Retryable RetryableRequest
}
func NewRetryableDefault ¶
type RetryableRequest ¶
type StatusCodeError ¶
func (StatusCodeError) Error ¶
func (s StatusCodeError) Error() string
Click to show internal directories.
Click to hide internal directories.