

def respond(self, request):
    self.send_response(200)
    self.send_header('Content-Type', 'application/json')
    self.end_headers()
    self.wfile.write((b'%s' % (json.dumps({
        'foo': 'bar',
    }),)))

dataset/ETHPy150Open smartfile/client-python/tests.py HTTPJSONRequestHandler.respond/original