Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Using METHOD and --verify causes URL not to be recognized

未关闭
#1,592 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
python
领域
cli

调研方向

复现报告中的 https GET --verify=no pie.dev/get 命令,并将其与此 issue 中的调试输出进行比较。从 http/https CLI 参数解析入口开始,然后验证 METHOD、--verify 和 URL 是否能一起被接受。完成的标准是命令能够到达请求阶段,并且不再将 URL 报告为无法识别的参数。

由索引模型根据 Issue 内容生成。

描述

bug new

Checklist

  • I've searched for similar issues.
  • I'm using the latest version of HTTPie.

Minimal reproduction code and steps

  1. https GET --verify=no pie.dev/get

Current result

usage:
    http [METHOD] URL [REQUEST_ITEM ...]

error:
    unrecognized arguments: pie.dev/get

for more information:
    run 'http --help' or visit https://httpie.io/docs/cli

Expected result

Make the request to the URL


Debug output

Please re-run the command with --debug, then copy the entire command & output and paste both below:

$ https  --debug GET --verify=no pie.dev/get
HTTPie 3.2.3
Requests 2.32.3
Pygments 2.18.0
Python 3.12.4 (main, Jun  7 2024, 06:33:07) [GCC 14.1.1 20240522]
/usr/bin/python
Linux 6.6.42-1-lts

<Environment {'apply_warnings_filter': <function Environment.apply_warnings_filter at 0x7fab523e4ea0>,
 'args': Namespace(),
 'as_silent': <function Environment.as_silent at 0x7fab523e4d60>,
 'colors': 256,
 'config': {'default_options': []},
 'config_dir': PosixPath('/home/kuba/.config/httpie'),
 'devnull': <property object at 0x7fab523e8360>,
 'is_windows': False,
 'log_error': <function Environment.log_error at 0x7fab523e4e00>,
 'program_name': 'https',
 'quiet': 0,
 'rich_console': <functools.cached_property object at 0x7fab527bb800>,
 'rich_error_console': <functools.cached_property object at 0x7fab5238ff50>,
 'show_displays': True,
 'stderr': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>,
 'stderr_isatty': True,
 'stdin': <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>,
 'stdin_encoding': 'utf-8',
 'stdin_isatty': True,
 'stdout': <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>,
 'stdout_encoding': 'utf-8',
 'stdout_isatty': True}>

<PluginManager {'adapters': [],
 'auth': [<class 'httpie.plugins.builtin.BasicAuthPlugin'>,
          <class 'httpie.plugins.builtin.DigestAuthPlugin'>,
          <class 'httpie.plugins.builtin.BearerAuthPlugin'>],
 'converters': [],
 'formatters': [<class 'httpie.output.formatters.headers.HeadersFormatter'>,
                <class 'httpie.output.formatters.json.JSONFormatter'>,
                <class 'httpie.output.formatters.xml.XMLFormatter'>,
                <class 'httpie.output.formatters.colors.ColorFormatter'>]}>
usage:
    http [METHOD] URL [REQUEST_ITEM ...]

error:
    unrecognized arguments: pie.dev/get

for more information:
    run 'http --help' or visit https://httpie.io/docs/cli
主要语言
Python
星标
38.6k
派生
4k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

httpie/cli 的其他 Issue

查看 httpie/cli 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。