MCPcopy
hub / github.com/cloudfoundry/cli / Make

Method Make

api/plugin/wrapper/request_logger.go:44–60  ·  view source on GitHub ↗

Make records the request and the response to UI

(request *http.Request, passedResponse *plugin.Response, proxyReader plugin.ProxyReader)

Source from the content-addressed store, hash-verified

42
43// Make records the request and the response to UI
44func (logger *RequestLogger) Make(request *http.Request, passedResponse *plugin.Response, proxyReader plugin.ProxyReader) error {
45 err := logger.displayRequest(request)
46 if err != nil {
47 logger.output.HandleInternalError(err)
48 }
49
50 err = logger.connection.Make(request, passedResponse, proxyReader)
51
52 if passedResponse.HTTPResponse != nil {
53 displayErr := logger.displayResponse(passedResponse)
54 if displayErr != nil {
55 logger.output.HandleInternalError(displayErr)
56 }
57 }
58
59 return err
60}
61
62// Wrap sets the connection on the RequestLogger and returns itself
63func (logger *RequestLogger) Wrap(innerconnection plugin.Connection) plugin.Connection {

Callers

nothing calls this directly

Calls 4

displayRequestMethod · 0.95
displayResponseMethod · 0.95
HandleInternalErrorMethod · 0.65
MakeMethod · 0.65

Tested by

no test coverage detected