MCPcopy
hub / github.com/projectdiscovery/proxify / NewMethod

Function NewMethod

pkg/swaggergen/method.go:11–22  ·  view source on GitHub ↗

NewMethod creates a new method

(reqRes RequestResponse)

Source from the content-addressed store, hash-verified

9
10// NewMethod creates a new method
11func NewMethod(reqRes RequestResponse) *Method {
12 method := &Method{
13 Responses: map[int]*Response{},
14 Parameters: NewParameters(reqRes.Request),
15 }
16 if reqRes.Response != nil {
17 method.Responses = map[int]*Response{
18 reqRes.Response.StatusCode: NewResponse(reqRes.Response),
19 }
20 }
21 return method
22}
23
24// UpdateMethod updates a method
25func (m *Method) UpdateMethod(reqRes RequestResponse) {

Callers 2

NewPathFunction · 0.85
UpdatePathMethod · 0.85

Calls 2

NewParametersFunction · 0.85
NewResponseFunction · 0.85

Tested by

no test coverage detected