How to send post request to REST API CakePHP 3.6

Backend CakePHP 3.6 REST , frontend React

Request

  1. Request URL: http://localhost/restcake/v1/translations.json
  2. Request Method: POST
  3. Status Code: 400 Bad Request
  4. Remote Address: [::1]:80
  5. Referrer Policy: no-referrer-when-downgrade

Reponse

  1. code: 400
  2. file: “PATHTO\vendor\cakephp\cakephp\src\Controller\Component\SecurityComponent.php”
  3. line: 351
  4. message: “’_Token’ was not found in request data.”
  5. url: “/v1/translations.json”

Request header

  1. Accept:

application/json

  1. Accept-Encoding:

gzip, deflate, br

  1. Accept-Language:

en-US,en;q=0.9,mn-MN;q=0.8,mn;q=0.7

  1. Cache-Control:

no-cache

  1. Connection:

keep-alive

  1. Content-Length:

68

  1. Content-Type:

application/json

  1. Cookie:

csrfToken=1ca4d0479b6721049b17fa879e269816515cdd216e2f0a85a828dad33fa2bacf3a341f74b7d08b75ffa3b9fbebd0219914d50d30e6abeec45129c2fe39e1f7fa; CAKEPHP=pv2nkumt1a32urftf2jvq5nrrm; remember_me=Q2FrZQ%3D%3D.ZGYyNDNiMjdkOTRlNDMyZGVjYzhkMWUwZTE4MTJhOWJjZjBkZjEzODA5MWE2ZjJkOWRhN2RkNTg0ZjEwZDM4ML2ESQrHcOqYaNiMcRSYoK4WcuCAPx%2Fz7UgmA6cBU6pZXYnQX29kT2zUhGDCVlU%2F0ZPjlHtX7qiyIsuEwiCrmBonaNBD6G8QL4WMgap2QOieQ6KV%2BnQjRKz%2FYvzyuxwcia7ChJNdcvy1%2B9UzCSSLWX%2BDBR%2F1Qivlvc0Dl1HL6tX%2BaWWc6IfoT82wS331XCMUzcIo0yQzyVp595PkT%2F8NjXtyK3M%2BeB5bKy%2FMYCAIrXLJWVCse9NYACix35fST0unQ69FBxihlu0Wli%2BAT3NGQWo%3D

  1. Host:

localhost

  1. Origin:

http://localhost:4000

  1. Pragma:

no-cache

  1. Referer:

http://localhost:4000/

  1. User-Agent:

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36

I temporary disabled CORS in middleware.