sujitha ram
sujitha ram

Reputation: 21

How to read raw http response from ISAPI dll using HttpURLConnection

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.

Upvotes: 1

Views: 747

Answers (1)

Jon Lin
Jon Lin

Reputation: 143846

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

Upvotes: 0

Related Questions