MCPcopy Create free account
hub / github.com/ContainerSSH/ContainerSSH / OnRequest

Method OnRequest

internal/config/handler_impl.go:14–29  ·  view source on GitHub ↗
(request http.ServerRequest, response http.ServerResponse)

Source from the content-addressed store, hash-verified

12}
13
14func (h *handler) OnRequest(request http.ServerRequest, response http.ServerResponse) error {
15 requestObject := config.Request{}
16 if err := request.Decode(&requestObject); err != nil {
17 return err
18 }
19 appConfig, err := h.handler.OnConfig(requestObject)
20 if err != nil {
21 return err
22 }
23 responseObject := config.ResponseBody{
24 Config: appConfig,
25 }
26 response.SetBody(responseObject)
27 response.SetStatus(200)
28 return nil
29}

Callers

nothing calls this directly

Calls 4

DecodeMethod · 0.65
OnConfigMethod · 0.65
SetBodyMethod · 0.65
SetStatusMethod · 0.65

Tested by

no test coverage detected