Exemplo n.º 1
0
 def _send_500(connection, message):
     response = JsonResponse()
     response.status = 500
     response.content = {'message': message}
     http_response = response.get_http()
     connection.send(http_response)
Exemplo n.º 2
0
 def _send_404(connection):
     response = JsonResponse()
     response.status = 404
     response.content = {'message': '404 Not Found'}
     http_response = response.get_http()
     connection.send(http_response)