我有一个web服务,需要在请求中发送特殊的头。我能够使用XMLHttpRequest和setRequestHeader()检索预期的响应XML。
有什么想法吗?
我没有发现的最大技巧是XPCOM合同ID必须以“@mozilla.org/network/protocol;1?name=”开头。例如。,:
/* as in foo:// . This is called the scheme. */ var thisIsWhatMyProtocolStartsWith = "foo"; var contractID = "@mozilla.org/network/protocol;1?name=" + thisIsWhatMyProtocolStartsWith;