What did I miss to send a http part post request
问题 I am trying to send an image using http multipart request (later I will add another image) I did this: HttpClient client = HttpClientBuilder.create().build(); HttpPost httpPost = new HttpPost( "http://localhost:8080/ServletExample1/multipart1"); httpPost.addHeader("Content-Type", "multipart/related; boundary=HereItGoes"); MultipartEntityBuilder builder = MultipartEntityBuilder.create(); FileBody bin = new FileBody(new File("./test.txt")); builder.addPart("bin", bin); HttpEntity entity =