refactored http_response.rb