HttpRequest 添加 PUT 与 DELETE 请求支持 [Gemini 3.1 Pro]#6312
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 156c506f93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| return IOUtils.readFullyAsString("gzip".equals(con.getContentEncoding()) | ||
| ? IOUtils.wrapFromGZip(con.getInputStream()) | ||
| : con.getInputStream()); |
There was a problem hiding this comment.
Read tolerated GET/DELETE error bodies
For GET/DELETE requests that opt into ignoreHttpCode() or ignoreHttpErrorCode(404), checkResponseCode(con) returns on a non-2xx response, but this direct getInputStream() path still throws for 4xx/5xx responses instead of consuming the error stream. This makes the new DELETE support unusable for APIs where callers intentionally tolerate an error response body; use the existing NetworkUtils.readFullyAsString(con) helper here as the POST path does.
Useful? React with 👍 / 👎.
https://minecraft.wiki/w/Mojang_API
调用皮肤与好友列表相关 API 需要支持这种请求。