X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=doc%2Fwget.texi;h=f040e8dce55894bc5801c1c3cb883dd427f8a59a;hp=60634f15318e61703700aafdb789bb945540f742;hb=0b4470b5e79248529f8fac79140f1e00ba3b9b43;hpb=532aa2cb2d13b203024bbbfb9792aa3d907897ba diff --git a/doc/wget.texi b/doc/wget.texi index 60634f15..f040e8dc 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -1394,10 +1394,20 @@ not to send the @code{User-Agent} header in @sc{http} requests. @cindex POST @item --post-data=@var{string} @itemx --post-file=@var{file} -Use POST as the method for all HTTP requests and send the specified data -in the request body. @code{--post-data} sends @var{string} as data, -whereas @code{--post-file} sends the contents of @var{file}. Other than -that, they work in exactly the same way. +Use POST as the method for all HTTP requests and send the specified +data in the request body. @samp{--post-data} sends @var{string} as +data, whereas @samp{--post-file} sends the contents of @var{file}. +Other than that, they work in exactly the same way. In particular, +they @emph{both} expect content of the form @code{key1=value1&key2=value2}, +with percent-encoding for special characters; the only difference is +that one expects its content as a command-line paramter and the other +accepts its content from a file. In particular, @samp{--post-file} is +@emph{not} for transmitting files as form attachments: those must +appear as @code{key=value} data (with appropriate percent-coding) just +like everything else. Wget does not currently support +@code{multipart/form-data} for transmitting POST data; only +@code{application/x-www-form-urlencoded}. Only one of +@samp{--post-data} and @samp{--post-file} should be specified. Please be aware that Wget needs to know the size of the POST data in advance. Therefore the argument to @code{--post-file} must be a regular