There can only be one source of input request data.
(self, *other_sources)
| 397 | self.args.data = data.encode() |
| 398 | |
| 399 | def _ensure_one_data_source(self, *other_sources): |
| 400 | """There can only be one source of input request data. |
| 401 | |
| 402 | """ |
| 403 | if any(other_sources): |
| 404 | self.error('Request body (from stdin, --raw or a file) and request ' |
| 405 | 'data (key=value) cannot be mixed. Pass ' |
| 406 | '--ignore-stdin to let key/value take priority. ' |
| 407 | 'See https://httpie.io/docs#scripting for details.') |
| 408 | |
| 409 | def _guess_method(self): |
| 410 | """Set `args.method` if not specified to either POST or GET |
no test coverage detected