Not sure what is going on here. I sort of hacked around the parameter syntax for axios and did this:axios.post('api/gen-traffic?' + 'param1=' + this.state.param1 + '¶m2=' + this.state.param2 ) .then((response) => { console.log('In then') console.log(response) }) .catch((error) => { console.log('In catch') console.log(error) }); And when I send this URL through Postman, everything works fine, but when I send it through Axios and query my Mongo instance using the params, one of them ends up undefined for no reason. However, when I initially post from Postman then do another one right after from Axios, it works. Any guidance? Can post some more code later.
Submitted June 30, 2017 at 07:46PM by tangerto
No comments:
Post a Comment