MCPcopy Create free account
hub / github.com/devfeel/dotweb / reset

Method reset

request.go:23–33  ·  view source on GitHub ↗

reset response attr

(r *http.Request, ctx Context)

Source from the content-addressed store, hash-verified

21
22// reset response attr
23func (req *Request) reset(r *http.Request, ctx Context) {
24 req.httpCtx = ctx
25 req.Request = r
26 req.isReadBody = false
27 if ctx.HttpServer().ServerConfig().EnabledRequestID {
28 req.requestID = ctx.HttpServer().DotApp.IDGenerater()
29 ctx.Response().SetHeader(HeaderRequestID, req.requestID)
30 } else {
31 req.requestID = ""
32 }
33}
34
35func (req *Request) release() {
36 req.Request = nil

Callers

nothing calls this directly

Calls 4

ServerConfigMethod · 0.80
HttpServerMethod · 0.65
ResponseMethod · 0.65
SetHeaderMethod · 0.45

Tested by

no test coverage detected