I am using an XMLHttpRequest to fetch an image from a server (run locally from a third party server-applet)
A simplified version of the code is show
Seems like the easiest thing to do would be to set up a local proxy service that you can access via a GET and URL parameters, and on the back end it does the POST to the original image service, receives the image data back, and passes it back to you. Then you just put the URL of your proxy (with parameters) into the img src attribute.
The proxy at myproxy POSTs a request to the image servlet accordingly.