??????????????MultipartEntityBuilder
???????????? ???????[ 2016/4/11 10:56:47 ] ??????????????? ??????
??????HttpCient4.3????????????????????λ??org.apache.http.entity.mime?μ?MultipartEntityBuilder??????MultipartEntity????????????????
????1.???????????????????
????setMode(HttpMultipartMode mode)??????mode?????BROWSER_COMPATIBLE??RFC6532??STRICT???????????STRICT??
????2.????????MultipartEntityBuilder??????????????????????
????a.????MultipartEntityBuilder.create()??????????
????b.addBinaryBody????????????????????????????File??InputStream??byte[]??????????
????addBinaryBody(String name?? File file?? ContentType contentType?? String filename)
????addBinaryBody(String name?? InputStream stream?? ContentType contentType?? String filename)
????addBinaryBody(String name?? byte[] b?? ContentType contentType?? String filename)
????c.addTextBody????????????
????addTextBody(String name?? String text?? ContentType contentType)
????d.addPart????Key/Value????????ContentBody?????????
????addPart(String name?? ContentBody contentBody)
????????????????ο???https://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntityBuilder.html????GACHA API?У?????????????????????????????addBinaryBody?????У??????????name???????????????????????????????????????????????????????????????????????????contentType??????ο???http://tool.oschina.net/commons???????????????????????????file/stream??fileName????????????????????????????????????????????API????????????????Щ/????????λ??API?????е? Request Payload??Ρ?
????3.?????????build()???????????HttpEntity????
????4.??HttpEntity?????????????URL???????HttpPost??setEntity???????
????5.?????????HttpClient??????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11