code: def respond(self, output):
          
          response = {'exit_code': output.code,
                      'command_output': output.log}
  
          self.send_response(200)
  
          self.send_header('Content-type', 'application/json')
          self.end_headers()
  
          self.wfile.write(bytes(json.dumps(response), "utf8"))
docs: Generates server response.