Documentation ¶
Index ¶
- Variables
- func DELETE(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) error
- func GET(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) error
- func GETBody(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) (io.ReadCloser, error)
- func PATCH(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) error
- func POST(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) error
- func PUT(ctx log.Interface, server string, strategy auth.Strategy, URI string, ...) error
- func Validate(val interface{}) error
- type HTTPError
- type RoundTripper
Constants ¶
This section is empty.
Variables ¶
var ( // MaxRedirects specifies the maximum number of redirects an HTTP // request should be able to make MaxRedirects = 5 )
Functions ¶
func DELETE ¶
func DELETE(ctx log.Interface, server string, strategy auth.Strategy, URI string, headers map[string]string) error
DELETE does a delete request to the account server
func GET ¶
func GET(ctx log.Interface, server string, strategy auth.Strategy, URI string, headers map[string]string, res interface{}) error
GET does a get request to the account server, decoding the result into the object pointed to byres
func GETBody ¶
func GETBody(ctx log.Interface, server string, strategy auth.Strategy, URI string, headers map[string]string) (io.ReadCloser, error)
GET does a get request to the account server, decoding the result into the object pointed to byres
func PATCH ¶
func PATCH(ctx log.Interface, server string, strategy auth.Strategy, URI string, headers map[string]string, body, res interface{}) error
PATCH creates an HTTP Patch request to the specified server, with the body encoded as JSON, decoding the result into the object pointed to byres
func POST ¶
func POST(ctx log.Interface, server string, strategy auth.Strategy, URI string, headers map[string]string, body, res interface{}) error
POST creates an HTTP Post request to the specified server, with the body encoded as JSON, decoding the result into the object pointed to byres
Types ¶
type HTTPError ¶
HTTPError represents an error coming over HTTP, it is not an error with executing the request itself, it is an error the server is flaggin to the client.
type RoundTripper ¶
type RoundTripper struct {
// contains filtered or unexported fields
}
func NewRoundTripper ¶
func NewRoundTripper(ctx log.Interface, headers map[string]string) *RoundTripper