mime: use in curl cli tool instead of form API.

Extended -F option syntax to support multipart mail messages.
-F keyword headers= added to include custom headers in parts.
Documentation upgraded.
This commit is contained in:
Patrick Monnerat 2017-09-02 18:17:33 +01:00
parent ce0881edee
commit fec7a858b8
17 changed files with 785 additions and 473 deletions

View file

@ -1606,11 +1606,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
to sort this out slowly and carefully */
if(formparse(config,
nextarg,
&config->httppost,
&config->last_post,
&config->mimepost,
&config->mimecurrent,
(subletter=='s')?TRUE:FALSE)) /* 's' means literal string */
return PARAM_BAD_USE;
if(SetHTTPrequest(config, HTTPREQ_FORMPOST, &config->httpreq))
if(SetHTTPrequest(config, HTTPREQ_MIMEPOST, &config->httpreq))
return PARAM_BAD_USE;
break;