title: curl post form data is not working
body: <p>I want to post form data to a service but it shows some error with form parameters, this is my curl script sample:</p>
  
  <pre><code>&lt;?php 
  //       header('Content-Type:application/json');
  
         $data = array();
         $data = json_decode(file_get_contents('php://input'), true);
  
  
         $user= $data["username"];
         $pass= $data["password"];
  
  
         $form_data = array('username' =&gt; $user, 'password' =&gt; $pass);
         $url = "http://localhost:8585/auth/session";
  
  
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($ch, CURLOPT_URL, $url);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_TIMEOUT, 75);
         curl_setopt($ch, CURLOPT_POST, 1);
         curl_setopt($ch, CURLOPT_POSTFIELDS, $form_data);
  
         $result = curl_exec($ch);
         curl_close($ch);
  
         echo "result $result";
  </code></pre>
  
  <p>on the service site it produce a error like this:</p>
  
  <pre><code>@FormParam is utilized when the content type of the request entity is not application/x-www-form-urlencoded
  </code></pre>