Merge "Implement graceful shutdown of consumer"
[nonrtric.git] / test / usecases / oruclosedlooprecovery / goversion / internal / restclient / client.go
index 7932bfa..036819a 100644 (file)
@@ -32,6 +32,10 @@ type RequestError struct {
        Body       []byte
 }
 
+func (e RequestError) Error() string {
+       return fmt.Sprintf("Request failed due to error response with status: %v and body: %v", e.StatusCode, string(e.Body))
+}
+
 // HTTPClient interface
 type HTTPClient interface {
        Get(url string) (*http.Response, error)
@@ -39,10 +43,6 @@ type HTTPClient interface {
        Do(*http.Request) (*http.Response, error)
 }
 
-func (pe RequestError) Error() string {
-       return fmt.Sprintf("Request failed due to error response with status: %v and body: %v", pe.StatusCode, string(pe.Body))
-}
-
 func PutWithoutAuth(url string, body []byte, client HTTPClient) error {
        return do(http.MethodPut, url, body, client)
 }