Quobyte API update

This commit is contained in:
Venkata Subbarao Chunduri
2018-05-30 13:56:37 +02:00
parent 15cd355281
commit 6eef91b7cf
4 changed files with 46 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"errors"
"io"
"log"
"math/rand"
"net/http"
"reflect"
@@ -110,5 +111,8 @@ func (client QuobyteClient) sendRequest(method string, request interface{}, resp
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode > 299 {
log.Printf("Warning: HTTP status code for request is %s\n", strconv.Itoa(resp.StatusCode))
}
return decodeResponse(resp.Body, &response)
}