title: Php Curl send File with data
body: <p>I need to upload 3 files along with variables in post data. This is what my call looks like - </p>
  
  <pre><code>$data['type1'] = new CurlFile($file1);
  $data['type2'] = new CurlFile($file2);
  $data['type3'] = new CurlFile($file3);
  
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data, "var1: $val1", "var2: $val2"); 
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: multipart/form-data', "headkey: $headkeyValue"));
  </code></pre>
  
  <p><strong>I am not able to get <code>$app-&gt;request()-&gt;post('var1');</code> from slim framework. It is empty.</strong> </p>
  
  <ul>
  <li>I am able to get the <code>headkey</code> from the Header as <code>$app-&gt;request()-&gt;headers('headkey');</code></li>
  <li>I am able to get the data in $_FILES</li>
  </ul>