Embed json in a query string
还没有人认领这个 Issue。
评估
调研方向
首先定位 HTTPie CLI 对 GET 查询参数的处理方式,以及其现有的 JSON 相关参数行为;该 issue 未指定任何文件或测试。将提议的 input[foo]===bar 语法与预期的编码 JSON 请求进行比较,然后定义受支持的语法,并验证针对嵌套 input 生成的请求。
由索引模型根据 Issue 内容生成。
描述
Checklist
- I've searched for similar feature requests.
Enhancement request
Embed JSON in a query string for GET requests.
Problem it solves
I'm trying to use the httpie CLI tool to quickly test out my tRPC backend and it works well for POST requests. But for GETs, tRPC requires you to embed the data as a JSON string in a query param like this:
myQuery?input=${encodeURIComponent(JSON.stringify(input))}
It would be nice if there's a syntax that can support this kind of use case. Maybe it can look something like this:
http GET https://localhost:3000/myQuery input[foo]===bar
GET myQuery?input=%7B%22foo%22%3A%22bar%22%7D HTTP/1.1
- 主要语言
- Python
- 星标
- 38.7k
- 派生
- 4k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
httpie/cli 的其他 Issue
-
A JSON body that starts with a brace can be parsed from the middle可能已有人在做 @SashaMIT 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
Header formatting reorders repeated fields with mixed capitalization可能已有人在做 @xu91102 于 13 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
JSON formatting ignores uppercase and mixed-case Content-Type values可能已有人在做 @xu91102 于 13 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
new
难度 2/5 1-3 小时 新手友好度 70/100
-
Bug: Windows guard in is_available() compares os.system (a function) to 'nt' — always False可能已有人在做 @yoshibase 于 86 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
相似的 Issue
-
Performance: deprecated DeviceEntry.config_entries access blocks the event loop for tens of seconds未关闭
难度 2/5 1-3 小时 新手友好度 75/100
tuya/tuya_cloud_ha_bridge#14 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
semantica-agi/semantica#1968 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
agent: ready area: submission priority: high type: docs
难度 2/5 1-3 小时 新手友好度 62/100
dkritarth/scopewatch#213 ·
维护者通常 1 天内回复
-
Broken link in RELEASE.md可能已有人在做 @Jah-yee 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
sphinx-contrib/httpdomain#143 ·
维护者通常 1 天内回复