title: POST Requests for CakePHP 3 API are not working
body: <p>I am developing an API using CakePHP 3.x documentation. To develop this API I am using their official documentation: <a href="https://book.cakephp.org/3.0/en/development/rest.html" rel="nofollow noreferrer">https://book.cakephp.org/3.0/en/development/rest.html</a></p>
  
  <p>When I try to access my api using GET request on url <a href="http://localhost/healthcare_portal/eapi/applicants/index.json" rel="nofollow noreferrer">http://localhost/healthcare_portal/eapi/applicants/index.json</a>, I get follow expected json result</p>
  
  <pre><code>{
      "applicants": [
          {
              "applicant_id": 1,
              "name": "Manender"
          },
          {
              "applicant_id": 2,
              "name": "mayank"
          }
      ]
  }
  </code></pre>
  
  <p>But when I access my api using POST request on same url <a href="http://localhost/healthcare_portal/eapi/applicants/index.json" rel="nofollow noreferrer">http://localhost/healthcare_portal/eapi/applicants/index.json</a>, I get CSRF Mismatch Token Error. Response from API in this case is</p>
  
  <pre><code>{
      "message": "Missing CSRF token cookie",
      "url": "/applicants/index.json",
      "code": 403,
      "file": "/opt/lampp/htdocs/healthcare_portal/eapi/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php",
      "line": 191
  }
  </code></pre>
  
  <p>I have tried other alternatives as adding </p>
  
  <pre><code> $input = (array) $this-&gt;request-&gt;input('json_decode', true);
  </code></pre>
  
  <p>in my controller's action but this is I get same error on post request. If anyone faced same issue, please help me in getting a breakthrough.</p>