[fit] Add multipart/form-data serialization support for HTTP client #331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
实现 HTTP 客户端的 multipart/form-data 请求序列化功能,支持文件上传和表单数据提交。
Changes
核心功能
Entity接口中添加resolvedParameters()方法,允许实体提供 Content-Type 额外参数MultiPartEntitySerializer.serializeEntity()方法,支持 multipart 格式序列化DefaultPartitionedEntity自动生成 boundary(格式:FitFormBoundary-{uuid})AbstractHttpMessage自动合并实体参数到 Content-Type header技术细节
UuidUtils.randomUuidString()生成唯一标识示例用法
Test Results
Breaking Changes
无破坏性变更。新增的
Entity.resolvedParameters()方法在AbstractEntity中提供了默认实现。Related Issue
Fixes #315
🤖 Generated with Claude Code