ksachdeva wrote:
hmm, excellent point, I now see why you mentioned other protocols. I
quickly looked in the code of nsXmlHttpRequest.cpp and I see lot of
references of nsIHttpChannel. Doesn't this imply dependence on Http
channel and how does this work with ftp and file ?. I have not used
these protocols in XmlHttpRequest but I am taking your word as you are
the guru here :).

XMLHttpRequest can do some things with HTTP that it can't do with others protocols (for example, POST requests, handling of error status codes to mean the response should not be parsed, etc). But it can be used to just fetch data from any protocol that we have a protocol handler for. If you need to do more than just load a URI (equivalent of an HTTP GET), then XMLHttpRequest might be difficult to use.

Again, subject to same-origin security checks if the caller is not privileged.

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to