(bug) res cannot be outside of get/post