mirror of
https://github.com/httpie/cli.git
synced 2026-06-20 11:32:56 +02:00
Fixed --form file upload mixed with redirected stdin error handling.
Close #840
This commit is contained in:
1 parent
6e9cd139a6
commit
e6bad645ed
5 files changed
+31
-2
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user