axios post request to send form data

后端 未结 9 2429
走了就别回头了
走了就别回头了 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:02

    Check out querystring.

    You can use it as follows:

    var querystring = require('querystring');
    axios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));
    

提交回复
热议问题