DEV Community


Discussion on: POST request in redux-saga not working

saiavinashiitr profile image
Sai Avinash Duddupudi Author • Edited

Update :- The 400 Bad request has gone away after I added "Content-Type": "application/x-www-form-urlencoded" in the headers and changed the body type accordingly

Example :-

fetch("api/xxx", {
    body: "",
    headers: {
        "Content-Type": "application/x-www-form-urlencoded",
    method: "post",
Enter fullscreen mode Exit fullscreen mode