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

Method initReq

request.go:197–211  ·  view source on GitHub ↗
(opChain *chain, method string)

Source from the content-addressed store, hash-verified

195}
196
197func (r *Request) initReq(opChain *chain, method string) {
198 httpReq, err := r.config.RequestFactory.NewRequest(method, r.config.BaseURL, nil)
199
200 if err != nil {
201 opChain.fail(AssertionFailure{
202 Type: AssertOperation,
203 Errors: []error{
204 errors.New("failed to create http request"),
205 err,
206 },
207 })
208 }
209
210 r.httpReq = httpReq
211}
212
213// Alias is similar to Value.Alias.
214func (r *Request) Alias(name string) *Request {

Callers 1

newRequestFunction · 0.95

Calls 2

failMethod · 0.80
NewRequestMethod · 0.65

Tested by

no test coverage detected