handles json and render in the same user or post GET listener