MCPcopy
hub / github.com/kubernetes/client-go / Do

Method Do

rest/request.go:805–816  ·  view source on GitHub ↗

Do formats and executes the request. Returns a Result object for easy response processing. Error type: * If the request can't be constructed, or an error happened earlier while building its arguments: *RequestConstructionError * If the server responds with a status: *errors.StatusError or *errors.U

()

Source from the content-addressed store, hash-verified

803// * If the server responds with a status: *errors.StatusError or *errors.UnexpectedObjectError
804// * http.Client.Do errors are returned directly.
805func (r *Request) Do() Result {
806 r.tryThrottle()
807
808 var result Result
809 err := r.request(func(req *http.Request, resp *http.Response) {
810 result = r.transformResponse(resp, req)
811 })
812 if err != nil {
813 return Result{err: err}
814 }
815 return result
816}
817
818// DoRaw executes the request but does not process the response body.
819func (r *Request) DoRaw() ([]byte, error) {

Callers 2

TestRequestSetsHeadersFunction · 0.95

Calls 3

tryThrottleMethod · 0.95
requestMethod · 0.95
transformResponseMethod · 0.95

Tested by 2

TestRequestSetsHeadersFunction · 0.76