Documentation ¶
Index ¶
- func DrainResponseBody(resp *http.Response)
- func DumpResponseIntoBuffer(resp *http.Response, body bool, buff *bytes.Buffer) (err error)
- func GetInteractshURLSFromEvent(event map[string]interface{}) []string
- type ResponseChain
- func (r *ResponseChain) Body() *bytes.Buffer
- func (r *ResponseChain) Close()
- func (r *ResponseChain) Fill() error
- func (r *ResponseChain) FullResponse() *bytes.Buffer
- func (r *ResponseChain) Has() bool
- func (r *ResponseChain) Headers() *bytes.Buffer
- func (r *ResponseChain) Previous() bool
- func (r *ResponseChain) Request() *http.Request
- func (r *ResponseChain) Response() *http.Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrainResponseBody ¶
DrainResponseBody drains the response body and closes it.
func DumpResponseIntoBuffer ¶
DumpResponseIntoBuffer dumps a http response without allocating a new buffer for the response body.
func GetInteractshURLSFromEvent ¶
if template contains more than 1 request and matchers require requestcondition from both requests , then we need to request for event from interactsh even if current request doesnot use interactsh url in it
Types ¶
type ResponseChain ¶
type ResponseChain struct {
// contains filtered or unexported fields
}
ResponseChain is a response chain for a http request on every call to previous it returns the previous response if it was redirected.
func NewResponseChain ¶
func NewResponseChain(resp *http.Response, maxBody int64) *ResponseChain
NewResponseChain creates a new response chain for a http request with a maximum body size. (if -1 stick to default 4MB)
func (*ResponseChain) Body ¶
func (r *ResponseChain) Body() *bytes.Buffer
Body returns the current response body in the chain
func (*ResponseChain) Close ¶
func (r *ResponseChain) Close()
Close the response chain and releases the buffers.
func (*ResponseChain) FullResponse ¶
func (r *ResponseChain) FullResponse() *bytes.Buffer
FullResponse returns the current response in the chain
func (*ResponseChain) Has ¶
func (r *ResponseChain) Has() bool
Has returns true if the response chain has a response
func (*ResponseChain) Headers ¶
func (r *ResponseChain) Headers() *bytes.Buffer
Response returns the current response in the chain
func (*ResponseChain) Previous ¶
func (r *ResponseChain) Previous() bool
previous updates response pointer to previous response if it was redirected and returns true else false
func (*ResponseChain) Request ¶
func (r *ResponseChain) Request() *http.Request
Request is request of current response
func (*ResponseChain) Response ¶
func (r *ResponseChain) Response() *http.Response
Response is response of current response