I have a response which may return text/html
or application/octet-stream
. If I receive html, I'd like to replace part of the page with the returned response data, and if I receive binary data (a file download), I would like to display a message and send the data to the browser so that the user can download the file. Is there any way to do this?
views:
159answers:
1
A:
The only thing I can think of is to make your download stage two-legged. That is, first request what type of response will happen with the given request data, and then make the actual request and handle both situations appropriately.
Stefan Kendall
2010-07-28 04:11:53