MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / makeHTTPResponse

Function makeHTTPResponse

pkg/controller/handler.go:200–210  ·  view source on GitHub ↗
(c *routing.Context, ctx *InvokeContext)

Source from the content-addressed store, hash-verified

198}
199
200func makeHTTPResponse(c *routing.Context, ctx *InvokeContext) {
201 c.SetStatusCode(ctx.Response.StatusCode)
202 for k, v := range ctx.Response.Headers {
203 c.Response.Header.Set(k, v)
204 }
205 if ctx.Response.BodyStream != nil {
206 c.Response.SetBodyStream(ctx.Response.BodyStream, -1)
207 return
208 }
209 c.Write(ctx.Response.Body)
210}

Callers 1

InvokeMethod · 0.85

Calls 4

SetBodyStreamMethod · 0.80
SetMethod · 0.65
WriteMethod · 0.65
SetStatusCodeMethod · 0.45

Tested by

no test coverage detected