Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultTimeout is the default timeout duration specified in seconds DefaultTimeout time.Duration // DefaultClient is an instance of the custom http.Client created with with the DefaultTimeout // (The returned client has a more leniant redirect policy always URL encoding/escaping the location prior to redirect) DefaultClient *http.Client )
Functions ¶
func CreateClient ¶
CreateClient is used to instantiate a custom http.Client with the specified timeout The returned client has a more leniant redirect policy always URL encoding/escaping the location prior to redirect TODO keep a cache of most commonly used clients so we can reuse them in the same way as we do for `DefaultClient`
Types ¶
type BatchedResponse ¶
type BatchedResponse struct { Sequence int Status string Proto string Header *http.Header Body *bytes.Reader ProcessingDuration time.Duration }
BatchedResponse is a simple type used as a container for the HTTP responses returned by ProcessBatch
func ProcessBatch ¶
ProcessBatch sends a batch of HTTP requests using http.Client. Each request is sent concurrently in a seperate goroutine. The HTTP responses are returned in the same sequence as their corresponding requests.
Click to show internal directories.
Click to hide internal directories.