labstack / echox

Echo cookbook and website
https://echo.labstack.com
MIT License
409 stars 285 forks source link

Modify every route's response before response, Without changing the original code #139

Closed youtwo123 closed 4 years ago

youtwo123 commented 4 years ago

Hi, i already have many routes that use echo.Context.Json() to return data. Without changing the original code and not changing the Json method, is there any way to return the data under unified processing before the data is returned, such as Chinese-English conversion? This Response().Before doesn't seem to meet my needs? If yes, how i get response data in Response().Before()?

youtwo123 commented 4 years ago

Sorry, put the wrong place