POST with Body Not Passing Cookies POST with Body Not Passing Cookies reactjs reactjs

POST with Body Not Passing Cookies


As I commented, I suspect the serialization part. Because when you pass your data as an query string, it works as you expected. So try like this

var qs = require('qs');return axios    .post(        urlJoin(            config.portal.url,            'Account/Register'),        qs.stringify({            UserName: "testing_engine@test.com",            UserFirstName: "First Name",            UserLastName: "Last Name",            Email: "testing_engine@test.com",            Password: "...",            ConfirmPassword: "..."        }),        {            jar: cookieJar,            withCredentials: true        })    .then(res => callback())    .catch(err => callback(err))