Added ProxyGet method to services client.

Added ProxyGet method to services client.
This commit is contained in:
Jerzy Szczepkowski
2015-08-25 13:56:08 +02:00
parent 1a8b400c3e
commit 08594dab8c
6 changed files with 87 additions and 15 deletions

View File

@@ -52,6 +52,13 @@ type HTTPClient interface {
Do(req *http.Request) (*http.Response, error)
}
// ResponseWrapper is an interface for getting a response.
// The response may be either accessed as a raw data (the whole output is put into memory) or as a stream.
type ResponseWrapper interface {
DoRaw() ([]byte, error)
Stream() (io.ReadCloser, error)
}
// RequestConstructionError is returned when there's an error assembling a request.
type RequestConstructionError struct {
Err error