I want to make a post request to a soap web service.
i did this:
private static HttpClient client = HttpClientBuilder.create().build();
private static HttpHost host = new HttpHost("localhost", 8080);
HttpRequest requset = new BasicHttpRequest("POST",
"/iOSS bla bla bla");
requset.addHeader("Authorization", "Basic c21hcnQ2ODYzOnNtYXJ0Njg2Mw==");
requset.addHeader("Content-Type",
"multipart/related; type=\"text/xml\"; boundary=\"--=Part1=-- \"");
requset.addHeader("SOAPAction", "");
I couldn't know how to add the body of the request. i didn't find the method for that
Kindly note that I am using HttpRequest
to form the Http request, I am not using HttpPost
to form a post request
could you help please