Reputation: 81
My form should upload a file and it should work with older versions of IE. That's why I use a hidden iframe. The thing is that I need to add a couple of headers to the request as they are required by the 3rd party API that I'm using. How to set the request headers when using an iframe?
Upvotes: 0
Views: 147
Reputation: 943563
You cannot.
XMLHttpRequest is the only API which browsers provide that allows that setting of HTTP headers from JavaScript.
Upvotes: 1