开发者

Setting headers in XDomainRequest or ActiveXObject('Microsoft.XMLHTTP')

开发者 https://www.devze.com 2022-12-27 00:04 出处:网络
I\'m trying to do something like this (W3 compliant, DOM): xhr.setRequestHeader( \'X-Requested-With\', \'XMLHttp开发者_运维技巧Request\' );

I'm trying to do something like this (W3 compliant, DOM):

xhr.setRequestHeader( 'X-Requested-With', 'XMLHttp开发者_运维技巧Request' );

For ActiveXObject('Microsoft.XMLHTTP') and XDomainRequest (IE8). I'm having no such luck finding it anywhere in microsoft documentation or even google. Any idea how I can achieve this?


Referring to this post http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx See the point three 3. No custom headers may be added to the request

You cannot add custom headers to an XDR object. Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消