1
Guys, I’m trying to send an XML from my Angular 2 view to a Java backend. In java I have a Servlet that searches the xml for the parameter:
request.getParameter("xml")
And in my angular service I’m doing it this way:
let urlSearchParams = new URLSearchParams();
urlSearchParams.append('xml', params);
let body = urlSearchParams.toString();
return this._http.post(url, body).map(this.extractJson);
Where the params
is xml, which comes as a function parameter. The URL is correct, debugging Java I get the request but the parameter is null. Something wrong that I’m doing?