Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Hrvoje Niksic
Darshit Shah writes: > Okay, I just checked. The man page clearly states: > >> In particular, they *both *expect content of the form >> "key1=value1&key2=value2" Good point. The man page should be changed make it clear that it's the *server* that expects such post data when processing HTML form

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Darshit Shah
Okay, these are certain points that do not come instantly to me. However, I never intended to break these. The above functionality would remain for backward compatibility with old scripts. I am simply debating on how to implement this as a new feature. On Thu, Mar 7, 2013 at 10:07 AM, Steven M. Sc

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Steven M. Schweda
> Also, is the --post-file command really needed? Even if one does really > need to use POST data from a file, one could always cat the file inside > backticks as: > > > wget --options=POST `cat POSTdata` URL > > > > Why not go with that? Apparently "always" means something to you which is di

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Darshit Shah
Okay, I just checked. The man page clearly states: > In particular, they *both *expect content of the form > "key1=value1&key2=value2" > However, in a practical use case, wget performs no such checks and will send any data you provide it with. So then how to unify --post-data and --post-file in

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Hrvoje Niksic
Daniel Stenberg writes: > On Thu, 7 Mar 2013, Darshit Shah wrote: > >> The only reason I said that is, even currently wget only accepts >> post data in a key=value format.* > > Oh wow. The above claim is patently false. Wget doesn't care about the format of --post-data or the contents of --post

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Giuseppe Scrivano
Darshit Shah writes: > Taking this forward. I figured it would be best to merge --post-data and > --post-file commands into --method=HTTPMethod > > I intend to use the following logic in merging them: > > wget --method=POST [data/file] URL If a method (like OPTIONS) includes an entity-body then

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Darshit Shah
The only reason I said that is, even currently wget only accepts post data in a key=value format.* *sorry it's not key:value but key=value. On Mar 7, 2013 12:12 AM, "Daniel Stenberg" wrote: > On Wed, 6 Mar 2013, Darshit Shah wrote: > > I intend to use the following logic in merging them: >> >>

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Daniel Stenberg
On Thu, 7 Mar 2013, Darshit Shah wrote: The only reason I said that is, even currently wget only accepts post data in a key=value format.* Oh wow. I guess it proves I never use this feature with wget - no big surprise there probably. But I consider that to be a terrible limitation as well, a

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Daniel Stenberg
On Wed, 6 Mar 2013, Darshit Shah wrote: I intend to use the following logic in merging them: wget --method=POST [data/file] URL The text immediately following --method=POST is first assumed to be data. If however it does not exist in the key:value format, assume that to be a file path and tr

Re: [Bug-wget] Syntax for RESTful scripting options

2013-03-06 Thread Darshit Shah
Taking this forward. I figured it would be best to merge --post-data and --post-file commands into --method=HTTPMethod I intend to use the following logic in merging them: wget --method=POST [data/file] URL The text immediately following --method=POST is first assumed to be data. If however it d