-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> It gets opened when you call send(). If you're in onload, that means > that it's already finished loading and gotten closed. That's the only > reason the open() call is not throwing; I'm not sure whether it should > in fact throw (ccing .network on that). > > What the channel _is_ there for is getting the response headers and > configuring the channel _before_ you call send(). > > So you're basically making two requests to the server, in case you care. ok, i catch that. however, given a channel, as i need a nsIInputStream to access the data, the only way i see to get this stream is through the open function. i don't see a getInputStream-like method in nsIChannel. how am i supposed to get this input stream ? > The point of XMLHttpRequest is to return the data as 1) a string and 2) > a DOM. Since you want neither one, why are you bothering with > XMLHttpRequest? just because i've always done that way and never realize creating the channel by hand was possible. thanks to you, now i know :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFeGzftMkIv0/ruZgRAnzJAKCFvPc5PEEgfmhN3oDIVl4OBFQ+JgCgjP93 BM/asQdKRm4obIibGH0DuWo= =PvgG -----END PGP SIGNATURE----- _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
