This may seem like a simple question. I`m reading the response from a HTTPS POST request that I made by getting hold of the input stream.
I`m sending the query parameters in the request by writing it into the output stream and reading back the response using the input stream..
I used to get the same query
string that I sent, back to me with the token value populated.
For eg: Query String sent in Request: ID = value1 &key = value2&token = value3
Modified Query String sent back in response ID = value1&key = value2&token = 12345
The problem is that now they have changed the way they are sending back the response and are now forwarding the response to our proxy server with Query string in the URL.
By the time I read the response, I lose the query string because it gets modified by the proxy server and I get an entire HTML page corresponding to the URL.
So, from the perspective of the Server sending the response, it appears to be fine as they are sending the modified query string in the url. But from my perspective, I have no use for the URL(no use of browser, Im doing this at code level)..Im not sure how to explain to them that instead of forwarding the URL, I just need to read the response parameters in the input stream. Any advise in what format I should ask them to send the response.
Sample code: