Closed nolawnchairs closed 7 years ago
Also having this issue with Request component.
I can not recreate your issue. Looking at the browser post in chrome shows that the post is in fact sending the request body data. I tried with both examples.
Are you sure your server is set up to receive request-body? (For a server running Express it would be 'body-parser' https://expressjs.com/en/resources/middleware/body-parser.html)
@mweiczorek @sheaivey I stringified the data params with querystring and it appears to be working. Using this on a simple client app without any middleware. Had to do the same thing with straight axios calls too: https://github.com/mzabriskie/axios#nodejs
@davingreen since you are not using the Express body-parse middleware you will not have access to post body. Querystring may be a work around but you should look into getting the getting post body working. I suggest using Postman for testing your server requests outside of your app.
I am going to close this issue since react-axios is functioning properly from he client side and is confirmed sending the request payload.
Version 1.0.3 installed via NPM
this.requestVars is a valid object, so I tried hard-coding:
That also sent no POST parameters.