Ejemplo n.º 1
0
 def _run_one_request(self, request):
     reply = request()
     if self.args.get('--dump-headers'):
         for key, value in reply.headers.items():
             print('%s: %r' % (key, value))
         print()
     if self.args.get('--json'):
         print(json_serializer.dumps(reply.body))
     else:
         pprint.pprint(reply.body)
Ejemplo n.º 2
0
 def _run_one_request(self, request):
     body = request().body
     if self.args.get('--json'):
         print(json_serializer.dumps(body))
     else:
         pprint.pprint(body)