googleapis / googleapis/google-cloud-java

[sdk-platform-java] Determine if HttpJson should allow null response back

未关闭
#12,518 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
priority: p4 type: cleanup
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
1 天 23 小时
30 天内合并 PR
157

描述

Check if this is the correct flow for GAX HttpJson:
https://github.com/googleapis/gapic-generator-java/blob/5863737238b302c6befd9670f83896be1cf190cb/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonClientCallImpl.java#L345-L346

Currently, a null response will treated as a server error. This may be because we are REST over gRPC and gRPC requires a response in the payload.

The REST world does allow for a null response:
https://stackoverflow.com/questions/46242200/post-with-no-response-body-which-response-code-is-better-201-or-204#:~:text=or%20deleting%20%2D%20204.-,201%20Created,by%20the%20effective%20request%20URI

We should investigate and determine if this is intended/ how we want to keep it.

贡献指南

打开贡献指南

调研方向

从 gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonClientCallImpl.java 的第 345-346 行开始,然后检查所关联的 REST 和 gRPC 响应语义。完成的标准是就 null 响应对于 HttpJson 是否有效作出有文档记录的决定,并使 issue 的预期行为与该决定保持一致。

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

评估

技术栈
java
领域
api
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

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