1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Fixed --form file upload mixed with redirected stdin error handling.

Close #840
This commit is contained in:
Jakub Roztocil
2020-01-23 15:54:43 +01:00
parent 6e9cd139a6
commit e6bad645ed
5 changed files with 31 additions and 2 deletions

View File

@@ -246,7 +246,8 @@ class HTTPieArgumentParser(argparse.ArgumentParser):
if self.args.data:
self.error('Request body (from stdin or a file) and request '
'data (key=value) cannot be mixed. Pass '
'--ignore-stdin to let key/value take priority.')
'--ignore-stdin to let key/value take priority. '
'See https://httpie.org/doc#scripting for details.')
self.args.data = getattr(fd, 'buffer', fd).read()
def _guess_method(self):