-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hrvoje Niksic wrote: > Micah Cowan <[email protected]> writes: > >> Hrvoje Niksic wrote: >>> A friend pointed out that Wget doesn't allow adding a request body to >>> GET requests, since both --post-data and --post-file automatically >>> switch to POST. It would be nice to support the equivalent of curl's >>> --request option, which specifies a custom request method for HTTP. >> Personally, I'm not particularly keen on implementing or maintaining >> such a thing. I don't really see it as falling under Wget's general >> scope, which as I see it is to non-interactively fetch content that a >> user might consider as "web content", in a matter comparable to that >> used by typical interactive clients (mainly web browsers and ftp >> clients). > > I am told that interactive clients issue GET requests with request > bodies when doing AJAX. If that is indeed the case, supporting it in > Wget might be genuinely useful.
Really? I'll be mildly shocked if that's the case, since that makes some silly assumptions about the server's (and client's!) capabilities, and is somewhat outside the bounds of what's specified for HTTP. Does JavaScript even supply a means for doing this, in general? But of course, you're right: if this is something that is being used for Ajax, especially if it's widespread, then it's something to consider for Wget. If anyone can find evidence of this practice being/becoming mainstream (or approaching it, etc), please post it here. A quick Google search on 'AJAX "request body" GET request' brought up mostly references to supplying parameters that whatever AJAX framework will translate to a query string for GET requests, and a request body for POST requests, so it sounds like most AJAX frameworks don't do this; but if there's even a single one in common use that does this, it's important to know about it. - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer. Maintainer of GNU Wget and GNU Teseq http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpKbN8ACgkQ7M8hyUobTrGwiACdFyp5Lg9JwYKqnii4Mxu+0aQP 5+IAn090nL/+62PsLmZfbZlG37jSXQQf =2ulu -----END PGP SIGNATURE-----
