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