Agular's proxy bypass (proxy.conf.js) method gives empty body

Viewed 68

Trying to print request body in proxy.conf.js (Angular's proxy bypass)

bypass: (req, res, opts) => {
 console.log(req.body)
}

but keep getting undefined

below is an exmaple fetch

  fetch("https://some-url.com", {
  "headers": {
    "content-type": "application/json",
  },
  "body": "{\"clusterId\":\"d477cdaeb175e5777fbb6fda\",\"newName\":\"c22\"}",
  "method": "PATCH",
});

why cant i get the body ?

0 Answers
Related