Handling images from XMLHttpRequest (with HTML and Javascript)

后端 未结 4 619
面向向阳花
面向向阳花 2020-12-19 09:31

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

4条回答
  •  攒了一身酷
    2020-12-19 10:30

    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.

提交回复
热议问题