Documentation
¶
Overview ¶
Package http provides http related servicing stuff
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UserAgent string
UserAgent keeps once created User-Agent string
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error represent error response from InfluxDBServer or http error
type RequestCallback ¶
RequestCallback defines function called after a request is created before any call
type ResponseCallback ¶
ResponseCallback defines function called after a successful response was received
type Service ¶
type Service interface {
PostRequest(ctx context.Context, url string, body io.Reader, requestCallback RequestCallback, responseCallback ResponseCallback) *Error
GetRequest(ctx context.Context, url string, requestCallback RequestCallback, responseCallback ResponseCallback) *Error
DoHTTPRequest(req *http.Request, requestCallback RequestCallback, responseCallback ResponseCallback) *Error
DoHTTPRequestWithResponse(req *http.Request, requestCallback RequestCallback) (*http.Response, error)
SetAuthorization(authorization string)
Authorization() string
HTTPClient() *http.Client
ServerAPIURL() string
ServerURL() string
}
Service handles HTTP operations with taking care of mandatory request headers
Click to show internal directories.
Click to hide internal directories.