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.
Yes, you understood correctly...But I don't have access to the Proxy server. Otherwise, I could have maybe written a filter to intercept the incoming url and check for the query parameters. As a workaround, if I could get them to have the response sent through their output stream, I could just get the content in the POST response. But, this does not make sense to them in the live environment.
Since, I just need a string as the response, wouldn't it be better for them to send it in the Output stream? And I am using SSL, so data will be encrypted..
Joined: Feb 26, 2013
Simply put, in this scenario, is it better to ask them to send the content I need in the body of the HTTP response?