[Discuss] URL syntax of POST method for contents of files?

pw p.willis at telus.net
Tue Sep 30 21:15:17 PDT 2014


Post doesn;t work that way. Only GET variables are entertained in
the URI syntax. The POST block is actually an HTTP header field.

You can send a post block with wget as either a string or from a file:


Wget -O /dev/stdout --post-data "somestuff"   --post-file 
/somepath/afile  "http://myurl.xyz"


Apologies for the word wrap. Email still sucks after all these years.

Peter


On 09/30/2014 06:51 PM, Alan W. Irwin wrote:

> But what is the URL syntax you use for POST requests?
>
> Is it just
>
> https://sourceforge.net/rest/p/plplot/wiki/Building_PLplot?text=<full
> contents of local file>
>
> ?
>
> And assuming that is correct for pasting the contents, is there a way
> I can simplify that URL (which would be very long) by referring to the
> local filename rather than having to paste its contents into the URL?
>
> Alan



More information about the Discuss mailing list