URLConnection
is only lazily executed whenever you call any of the get
methods.
Add the following to your code to actually execute the HTTP request and obtain the servlet response body.
InputStream response = servletConnection.getInputStream();
URLConnection
is only lazily executed whenever you call any of the get
methods.
Add the following to your code to actually execute the HTTP request and obtain the servlet response body.
InputStream response = servletConnection.getInputStream();