def http(*args, **kwargs): http_kwargs = { 'stdin_isatty': True, 'stdout_isatty': False } http_kwargs.update(kwargs) stdout = http_kwargs.setdefault('stdout', StringIO()) httpie.main(args=args, **http_kwargs) return stdout.getvalue()
def http(*args, **kwargs): stdout = StringIO() httpie.main(args=args, stdout=stdout, stdin_isatty=True, stdout_isatty=False) return stdout.getvalue()
def http(*args, **kwargs): http_kwargs = {'stdin_isatty': True, 'stdout_isatty': False} http_kwargs.update(kwargs) stdout = http_kwargs.setdefault('stdout', StringIO()) httpie.main(args=args, **http_kwargs) return stdout.getvalue()