axios post request to send form data

后端 未结 9 2408
走了就别回头了
走了就别回头了 2020-11-22 03:40

axios POST request is hitting the url on the controller but setting null values to my POJO class, when I go through developer tools in chrome, the payload conta

9条回答
  •  独厮守ぢ
    2020-11-22 04:01

    Even More straightforward:

    axios.post('/addUser',{
        userName: 'Fred',
        userEmail: 'Flintstone@gmail.com'
    })
    .then(function (response) {
        console.log(response);
    })
    .catch(function (error) {
        console.log(error);
    });
    

提交回复
热议问题