github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/response.go (about)

     1  package cloudcontroller
     2  
     3  import "net/http"
     4  
     5  // Response represents a Cloud Controller response object.
     6  type Response struct {
     7  	// DecodeJSONResponseInto represents the resource entity type that is
     8  	// expected in the response JSON.
     9  	DecodeJSONResponseInto interface{}
    10  
    11  	// RawResponse represents the response body.
    12  	RawResponse []byte
    13  
    14  	// Warnings represents warnings parsed from the custom warnings headers of a
    15  	// Cloud Controller response.
    16  	Warnings []string
    17  
    18  	// HTTPResponse represents the HTTP response object.
    19  	HTTPResponse *http.Response
    20  
    21  	// ResourceLocationURL represents the Location header value
    22  	ResourceLocationURL string
    23  }
    24  
    25  func (r *Response) reset() {
    26  	r.RawResponse = []byte{}
    27  	r.Warnings = []string{}
    28  	r.HTTPResponse = nil
    29  }