Add request and response modifier support

This commit is contained in:
David Stotijn
2019-11-24 19:46:38 +01:00
parent ee8e4330c1
commit 9d9c46c63f
3 changed files with 62 additions and 18 deletions

11
proxy/modify.go Normal file
View File

@ -0,0 +1,11 @@
package proxy
import "net/http"
var (
nopReqModifier = func(req *http.Request) {}
nopResModifier = func(res *http.Response) error { return nil }
)
type RequestModifyFunc func(req *http.Request)
type ResponseModifyFunc func(res *http.Response) error