MCPcopy Index your code
hub / github.com/github/copilot-sdk / handleHTTP

Method handleHTTP

go/copilot_request_handler.go:172–183  ·  view source on GitHub ↗
(rctx *CopilotRequestContext, sink *responseSink)

Source from the content-addressed store, hash-verified

170}
171
172func (h *CopilotRequestHandler) handleHTTP(rctx *CopilotRequestContext, sink *responseSink) error {
173 httpReq, err := buildHTTPRequest(rctx)
174 if err != nil {
175 return err
176 }
177 resp, err := h.roundTripper().RoundTrip(httpReq)
178 if err != nil {
179 return err
180 }
181 defer resp.Body.Close()
182 return streamResponseToSink(resp, sink)
183}
184
185func buildHTTPRequest(rctx *CopilotRequestContext) (*http.Request, error) {
186 body := drainBody(rctx.body)

Callers 1

handleMethod · 0.95

Calls 5

roundTripperMethod · 0.95
buildHTTPRequestFunction · 0.85
streamResponseToSinkFunction · 0.85
CloseMethod · 0.65
RoundTripMethod · 0.45

Tested by

no test coverage detected