Refactoring Rest controller - replaced call `http_response_code` with Re...

...sponse instance