v0.0.417 add GinWrapper.ForwardRequest
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m26s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m26s
This commit is contained in:
@@ -194,3 +194,9 @@ func (w *GinWrapper) ServeHTTP(req *http.Request) *httptest.ResponseRecorder {
|
||||
w.engine.ServeHTTP(respRec, req)
|
||||
return respRec
|
||||
}
|
||||
|
||||
// ForwardRequest manually inserts a request into this router
|
||||
// = behaves as if the request came from the outside (and writes the response to `writer`)
|
||||
func (w *GinWrapper) ForwardRequest(writer http.ResponseWriter, req *http.Request) {
|
||||
w.engine.ServeHTTP(writer, req)
|
||||
}
|
||||
|
Reference in New Issue
Block a user