Skip to content

fix#3857 (http-support): implement native file request body support#3858

Open
YianZhao wants to merge 3 commits intoeclipse-sw360:mainfrom
YianZhao:bug-native-requestbody-file-support
Open

fix#3857 (http-support): implement native file request body support#3858
YianZhao wants to merge 3 commits intoeclipse-sw360:mainfrom
YianZhao:bug-native-requestbody-file-support

Conversation

@YianZhao
Copy link
Contributor

Implemented native file body support in NewRequestBodyBuilderImpl.file(Path, String).

  • Related issue: Bug: NewRequestBodyBuilderImpl.file() is unimplemented for native HTTP client #3857
  • How this solves it:
    • file(...) was previously unimplemented (TODO), so native client file upload body could not be created.
    • This PR now uses BodyPublishers.ofFile(path) to create the request body.
    • IOException is wrapped in IllegalStateException for consistent builder error handling.
  • Dependencies:
    • No new dependencies added or updated.

Suggest Reviewer

@GMishx

How To Test?

Run:

mvn -pl clients/http-support "-Dbase.deploy.dir=." "-DskipTests=false" "-Dmaven.test.skip=false" "-Dtest=NewRequestBodyBuilderImplTest,RequestBodyBuilderImplTest" test

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 12, 2026
@YianZhao
Copy link
Contributor Author

Thanks for taking a look. All checks are passing on my side now. Please let me know if any changes are needed when you review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants