MCPcopy Create free account
hub / github.com/gavv/httpexpect / NewResponseC

Function NewResponseC

response.go:79–90  ·  view source on GitHub ↗

NewResponse returns a new Response instance with config. Requirements for config are same as for WithConfig function. If response is nil, failure is reported. If rtt is given, it defines response round-trip time to be reported by response.RoundTripTime().

(
	config Config, response *http.Response, rtt ...time.Duration,
)

Source from the content-addressed store, hash-verified

77// If rtt is given, it defines response round-trip time to be reported
78// by response.RoundTripTime().
79func NewResponseC(
80 config Config, response *http.Response, rtt ...time.Duration,
81) *Response {
82 config = config.withDefaults()
83
84 return newResponse(responseOpts{
85 config: config,
86 chain: newChainWithConfig("Response()", config),
87 httpResp: response,
88 rtt: rtt,
89 })
90}
91
92type responseOpts struct {
93 config Config

Callers 1

Calls 3

newResponseFunction · 0.85
newChainWithConfigFunction · 0.85
withDefaultsMethod · 0.80

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…