且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我应该为 MultipartEntity 设置 Content-Type 标头吗?

更新时间:2021-11-23 21:38:30

不,你不应该.您应该让 HttpClient 根据消息实体的属性自动生成 Content-Type 以及其他内容元数据标头.

No, you should not. You should let HttpClient generate Content-Type as well as other content metadata headers automatically based on properties of the message entity.