mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Get response content-type
This commit is contained in:
parent
303e7cbdb0
commit
4ca128d71a
@ -1288,6 +1288,14 @@ func (r Result) StatusCode(statusCode *int) Result {
|
|||||||
return r
|
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.
|
// 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
|
// If the returned object is of type Status and has .Status != StatusSuccess, the
|
||||||
// additional information in Status will be used to enrich the error.
|
// additional information in Status will be used to enrich the error.
|
||||||
|
Loading…
Reference in New Issue
Block a user