Skip to content

HttpRequest 添加 PUTDELETE 请求支持 [Gemini 3.1 Pro]#6312

Open
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:https
Open

HttpRequest 添加 PUTDELETE 请求支持 [Gemini 3.1 Pro]#6312
CiiLu wants to merge 1 commit into
HMCL-dev:mainfrom
CiiLu:https

Conversation

@CiiLu

@CiiLu CiiLu commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

https://minecraft.wiki/w/Mojang_API
调用皮肤与好友列表相关 API 需要支持这种请求。

@Wulian233

Copy link
Copy Markdown
Contributor

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +159 to +161
return IOUtils.readFullyAsString("gzip".equals(con.getContentEncoding())
? IOUtils.wrapFromGZip(con.getInputStream())
: con.getInputStream());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/util/io/HttpRequest.java
This was referenced Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants