bcosca/fatfree — pull request #653 by xfra35 (2014-07-31 14:01:02+00:00)
Title: Web->request: allow file upload with curl

Hi,

In a project there was a need to send a file from the webserver to another webserver. I thought I would try with `$web->request`. It turned out that it could easily be done, providing the engine is set to `curl` and the file name is declared as a `content` prefixed by a `@` sign (cf. option *CURLOPT_POSTFIELDS* in [cURL doc](http://php.net/manual/en/function.curl-setopt.php)).

The only thing is that in that case, `content` has to be passed as an array, and the headers `Content-Type` and `Content-Length` don't have to be automatically computed by F3 since cURL will do it. Hence this pull request.

Example:
```
$web->engine('curl');
$content=array(
'field1'=>'value1',
'field2'=>'value2',
'file1'=>'@/foo/bar/myfile.ext',
);
$web->request($url,array(
'method'=>'POST',
'content'=>$content
));
```