How to read raw http response from ISAPI dll using HttpURLConnection

730 Views Asked by At

My requirement is to send and receive HTTP request and response from ISAPI dll which is hosted in IIS using Java. Our ISAPI dll sends raw xml data as response without http headers so when calling HTTPURLConnection.getinputstream() from client I am getting UnknownLengthHttpInputStream exception. Can I use HTTPURLConnection to read the http response data without header details or should I use sockets to read response in client?

Any help is appreciated.

Thanks.

1

There are 1 best solutions below

2
On

You just need to call HttpURLConnection.getInputStream() and read your xml data from there.