title: Why I am not receiving data at server end by sending axios.put request
body: <p>I am using Axios Api in reactjs.Axios.get is working fine for me but I am facing a issue with axios.put, when i send request with simple object i get the correct response but when i send request formdata i get null in response. </p>
  
  <p>When i send request with simple object which is working fine:</p>
  
  <pre><code>  const data= {ProductName:"Dummy"};
  const apiurl = `http://localhost/testapi/index.php/api/products/product`;
  axios.put(apiurl, data).then(response =&gt; {
    console.log(response.data);
  });
  </code></pre>
  
  <p>Server End:</p>
  
  <pre><code> public function product_post()
  {
      $data = array();
      $data['ProductName'] = $this-&gt;post('ProductName');
      $this-&gt;response(
          [
              'status' =&gt; "ok",
              'message' =&gt; "Data inserted successfully",
              'info' =&gt; $data['ProductName']
          ],
          REST_Controller::HTTP_OK
      );
  }
  </code></pre>
  
  <p>I am getting the correct response which "Dummy"</p>
  
  <p>When i send request with Formdata which is not working fine:</p>
  
  <pre><code>  var data= new FormData();
  data.set("ProductName","Dummy");
  const apiurl = `http://localhost/testapi/index.php/api/products/product`;
  await axios.put(apiurl, data).then(response =&gt; {
    console.log(response.data);
  });
  </code></pre>
  
  <p>Server End:</p>
  
  <pre><code> public function product_post()
  {
      $data = array();
      $data['ProductName'] = $this-&gt;post('ProductName');
      $this-&gt;response(
          [
              'status' =&gt; "ok",
              'message' =&gt; "Data inserted successfully",
              'info' =&gt; $data['ProductName']
          ],
          REST_Controller::HTTP_OK
      );
  }
  </code></pre>
  
  <p>Now the response i am receiving with $data['ProductName'] is null.
  One thing more i also tried to send file with formdata but got null</p>
  
  <p>Please tell me what is wrong with the code.</p>