Get response content-type

Kubernetes-commit: 4ca128d71aa94653927b0e529b746cb7428563b1
This commit is contained in:
Sean Sullivan
2022-11-02 00:03:24 +00:00
committed by Kubernetes Publisher
parent 0d57396335
commit 8ff4970e81

View File

@@ -1288,6 +1288,14 @@ func (r Result) StatusCode(statusCode *int) Result {
return r
}
// ContentType returns the "Content-Type" response header into the passed
// string, returning the Result for possible chaining. (Only valid if no
// error code was returned.)
func (r Result) ContentType(contentType *string) Result {
*contentType = r.contentType
return r
}
// Into stores the result into obj, if possible. If obj is nil it is ignored.
// If the returned object is of type Status and has .Status != StatusSuccess, the
// additional information in Status will be used to enrich the error.