Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Consider I want this content type: multipart/related; type="application/json"; start="<e8f615d3-5169-42a8-88fe-e5d2a6147db4@lda-client-x>"; boundary=jkEwGD2liR4fm3pYCaajTuSi116SUhmmB91VJ2_n
I have to do
MultipartEntityBuilder eb = MultipartEntityBuilder.create(); eb.setContentType(ContentType.create("multipart/related", new BasicNameValuePair("type", "application/json"), new BasicNameValuePair("start", String.format("<%s>", moduleJobCid))));
The easier way should be
MultipartEntityBuilder eb = MultipartEntityBuilder.create(); eb.setMimeSubtype("related"); eb.addParameter(new BasicNameValuePair(...)); eb.addParameter(new BasicNameValuePair(...));