mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 17:28:53 +02:00
refactor: remove Tracer from middleware implementations and related debugging functionality
This commit is contained in:
@@ -6,19 +6,16 @@ import (
|
||||
|
||||
type modifyResponse struct {
|
||||
ModifyRequestOpts
|
||||
Tracer
|
||||
}
|
||||
|
||||
var ModifyResponse = NewMiddleware[modifyResponse]()
|
||||
|
||||
// modifyResponse implements ResponseModifier.
|
||||
func (mr *modifyResponse) modifyResponse(resp *http.Response) error {
|
||||
mr.AddTraceResponse("before modify response", resp)
|
||||
if !mr.needVarSubstitution {
|
||||
mr.modifyHeaders(resp.Request, resp.Header)
|
||||
} else {
|
||||
mr.modifyHeadersWithVarSubstitution(resp.Request, resp, resp.Header)
|
||||
}
|
||||
mr.AddTraceResponse("after modify response", resp)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user