MCPcopy
hub / github.com/gofiber/fiber / AcquireRequest

Function AcquireRequest

client/request.go:988–994  ·  view source on GitHub ↗

AcquireRequest returns a new (pooled) Request object.

()

Source from the content-addressed store, hash-verified

986
987// AcquireRequest returns a new (pooled) Request object.
988func AcquireRequest() *Request {
989 req, ok := requestPool.Get().(*Request)
990 if !ok {
991 panic(errRequestTypeAssertion)
992 }
993 return req
994}
995
996// ReleaseRequest returns the Request object to the pool.
997// Do not use the released Request afterward to avoid data races.

Callers 15

Test_Parser_Request_URLFunction · 0.85
Test_Parser_Request_BodyFunction · 0.85
Test_Response_StatusFunction · 0.85
Test_Response_ProtocolFunction · 0.85
Test_Response_HeaderFunction · 0.85
Test_Response_HeadersFunction · 0.85
Benchmark_HeadersFunction · 0.85
Test_Response_CookieFunction · 0.85
Test_Response_BodyFunction · 0.85
Test_Response_SaveFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by 15

Test_Parser_Request_URLFunction · 0.68
Test_Parser_Request_BodyFunction · 0.68
Test_Response_StatusFunction · 0.68
Test_Response_ProtocolFunction · 0.68
Test_Response_HeaderFunction · 0.68
Test_Response_HeadersFunction · 0.68
Benchmark_HeadersFunction · 0.68
Test_Response_CookieFunction · 0.68
Test_Response_BodyFunction · 0.68
Test_Response_SaveFunction · 0.68