Method
OnRequest
(request http.ServerRequest, response http.ServerResponse)
Source from the content-addressed store, hash-verified
| 12 | } |
| 13 | |
| 14 | func (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
Tested by
no test coverage detected