|
47 | 47 | Only URL is required.
|
48 | 48 | """,
|
49 | 49 | )
|
50 |
| - |
51 |
| -positional_arguments.add_argument( |
52 |
| - dest='method', |
53 |
| - metavar='METHOD', |
54 |
| - nargs=Qualifiers.OPTIONAL, |
55 |
| - default=None, |
56 |
| - short_help='The HTTP method to be used for the request (GET, POST, PUT, DELETE, ...).', |
57 |
| - help=""" |
58 |
| - The HTTP method to be used for the request (GET, POST, PUT, DELETE, ...). |
59 |
| -
|
60 |
| - This argument can be omitted in which case HTTPie will use POST if there |
61 |
| - is some data to be sent, otherwise GET: |
62 |
| -
|
63 |
| - $ http example.org # => GET |
64 |
| - $ http example.org hello=world # => POST |
65 |
| -
|
66 |
| - """, |
67 |
| -) |
68 | 50 | positional_arguments.add_argument(
|
69 | 51 | dest='url',
|
70 | 52 | metavar='URL',
|
@@ -699,6 +681,23 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
|
699 | 681 |
|
700 | 682 | network = options.add_group('Network')
|
701 | 683 |
|
| 684 | +network.add_argument( |
| 685 | + '--method', |
| 686 | + '-X', |
| 687 | + metavar='METHOD', |
| 688 | + default=None, |
| 689 | + short_help='The HTTP method to be used for the request (GET, POST, PUT, DELETE, ...).', |
| 690 | + help=""" |
| 691 | + The HTTP method to be used for the request (GET, POST, PUT, DELETE, ...). |
| 692 | +
|
| 693 | + This argument can be omitted in which case HTTPie will use POST if there |
| 694 | + is some data to be sent, otherwise GET: |
| 695 | +
|
| 696 | + $ http example.org # => GET |
| 697 | + $ http example.org hello=world # => POST |
| 698 | +
|
| 699 | + """, |
| 700 | +) |
702 | 701 | network.add_argument(
|
703 | 702 | '--offline',
|
704 | 703 | default=False,
|
|
0 commit comments