Talk:XMLHttpRequest

From MozillaZine Knowledge Base
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

I want to send an HTTP Request with some custom headers to a proxy server and save the response (a Jpeg file) to the local disk. I tried using XMLHttpRequest() for this, but that only seems to work for text files. (I am basically accessing XMLHttpRequest.response and writing that to a file using (file-output-stream)'s outputstream.write() )

I'd be very grateful if someone can provide an example for JPEG.

thanks!