Unable to get request body in flask api using request.form from axios request

247 views Asked by At

I have written a flask api which recieves post request params using request.form. API performs perfectly in postman but fails in axios request.

1

There are 1 answers

1
Pushprajsinh Chudasama On

You can try this way.I hope it will helps you.

axios({
      method: 'post',
      url: '/user/12345',
      data: {
        firstName: 'Fred',
        lastName: 'Flintstone'
      }
    });