Discussion regarding `HttpTransport` exposed methods
还没有人认领这个 Issue。
评估
调研方向
先阅读 HttpTransport 及其 executeRequestAsync 重载,然后检查 getLogs() 等调用方,以及讨论中描述的端点组合。确定特定操作的辅助方法是否保留了现有的 POST/READ、POST/WRITE 和 GET/READ 灵活性;只有在 API 形态以及任何 requestAsync 可见性变更都达成一致并得到一致应用后,工作才算完成。
由索引模型根据 Issue 内容生成。
描述
I think introducing helpers in "HttpTransport" would make the code in callers more straightforward. Let's introduce "HttpTransport.doGet(Async)", "HttpTransport.doPost(Async)", "HttpTransport.doPut(Async)", "HttpTransport.doDelete(Async)" - performing corresponding HTTP operations and setting the call type ~appropriately (eg READ for GET, WRITE otherwise - with the possibility for "doPost" to override it to "READ", or have a doPostForRead or something like that). This would also permit to remove the necessity of giving null data on GET, (doGet wouldn't take a "data" argument). As a second step, it could make sense to make requestAsync private.
Not really sure about this one! We have lots of combination with the endpoints such as. POST/READ/data:null, POST/WRITE/data or GET/READ/data:null. I fear that introducing an helper would reduce the "flexibility" of the transporter. I would prefer to keep it like this. WDYT @Anthony Seure?
Moreover, an overload is available for null data (I forgot to use it in getLogs() :D). So you can perform an executeRequestAsync without passing "null" explicitly as data : Example: POST without data.
cc @Ant-hem @BenoitPerrot
- 主要语言
- Java
- 星标
- 51
- 派生
- 33
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
algolia/algoliasearch-client-java 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 25/100
algolia/algoliasearch-client-java#788 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
algolia/algoliasearch-client-java#781 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
查看 algolia/algoliasearch-client-java 的全部 Issue
相似的 Issue
-
bug pdd
难度 2/5 1 小时以内 新手友好度 76/100
objectionary/eoc#1555 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ClouGence/open-cdm#487 · 2 条评论 ·
维护者通常 1 天内回复
-
security
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复