summaryrefslogtreecommitdiff
path: root/pkg/bindings/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/errors.go')
-rw-r--r--pkg/bindings/errors.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/bindings/errors.go b/pkg/bindings/errors.go
index 3339062a5..9c311d912 100644
--- a/pkg/bindings/errors.go
+++ b/pkg/bindings/errors.go
@@ -20,6 +20,8 @@ func handleError(data []byte) error {
return e
}
+// Process drains the response body, and processes the HTTP status code
+// Note: Closing the response.Body is left to the caller
func (h APIResponse) Process(unmarshalInto interface{}) error {
data, err := ioutil.ReadAll(h.Response.Body)
if err != nil {