v0.0.417 add GinWrapper.ForwardRequest
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m26s

This commit is contained in:
2024-03-20 08:58:59 +01:00
parent 14f39a9162
commit 7c869c65f3
4 changed files with 14 additions and 3 deletions

View File

@@ -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)
}