[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Darshit Shah
Subject: Re: [Bug-wget] Syntax for RESTful scripting options
Date: Thu, 7 Mar 2013 09:29:45 +0530

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 into one option? I too am
not a bid advocate of changing the meaning according to the content but
that seemed like the easiest way forward.

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?

On Thu, Mar 7, 2013 at 2:58 AM, Giuseppe Scrivano <address@hidden> wrote:

> Darshit Shah <address@hidden> 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 the data can be
> still passed trough --post-data or --post-file.
> I don't really like the idea of an argument that can have different
> meanings according to its content, in this case presence or not of ':'.
> What would be the advantage of dropping them?
> --
> Giuseppe

Thanking You,
Darshit Shah
Research Lead, Code Innovation
Kill Code Phobia.
B.E.(Hons.) Mechanical Engineering, '14. BITS-Pilani

reply via email to

[Prev in Thread] Current Thread [Next in Thread]