File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 2626 // SetRequest sets `*http.Request`.
2727 SetRequest (r * http.Request )
2828
29+ // SetResponse sets `*Response`.
30+ SetResponse (r * Response )
31+
2932 // Response returns `*Response`.
3033 Response () * Response
3134
@@ -228,6 +231,10 @@ func (c *context) Response() *Response {
228231 return c .response
229232}
230233
234+ func (c * context ) SetResponse (r * Response ) {
235+ c .response = r
236+ }
237+
231238func (c * context ) IsTLS () bool {
232239 return c .request .TLS != nil
233240}
Original file line number Diff line number Diff line change @@ -771,6 +771,7 @@ func WrapMiddleware(m func(http.Handler) http.Handler) MiddlewareFunc {
771771 return func (c Context ) (err error ) {
772772 m (http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
773773 c .SetRequest (r )
774+ c .SetResponse (NewResponse (w , c .Echo ()))
774775 err = next (c )
775776 })).ServeHTTP (c .Response (), c .Request ())
776777 return
You can’t perform that action at this time.
0 commit comments