feat(input-csv-twice): add alert to axios post callback
This commit is contained in:
parent
22187e6564
commit
023c002b2a
|
@ -58,7 +58,14 @@ const CsvReader = () => {
|
||||||
//console.log('post() start...');
|
//console.log('post() start...');
|
||||||
//console.log('post() requestBody: ' + JSON.stringify(requestBody));
|
//console.log('post() requestBody: ' + JSON.stringify(requestBody));
|
||||||
/*If you pass a JavaScript object as the 2nd parameter to the axios.post() function, Axios will automatically serialize the object to JSON for you. Axios will also set the Content-Type header to 'application/json', so web frameworks like Express can automatically parse it.*/
|
/*If you pass a JavaScript object as the 2nd parameter to the axios.post() function, Axios will automatically serialize the object to JSON for you. Axios will also set the Content-Type header to 'application/json', so web frameworks like Express can automatically parse it.*/
|
||||||
axios.post('http://localhost:3000/', requestBody);
|
axios.post('http://localhost:3000/', requestBody).then((rsp)=>{
|
||||||
|
console.log('axios.post() data: ' + rsp.data);
|
||||||
|
if(rsp.data === 'OK'){
|
||||||
|
alert('Send succeeded!');
|
||||||
|
}else{
|
||||||
|
alert('Send failed!');
|
||||||
|
}
|
||||||
|
});
|
||||||
//console.log('post() done.');
|
//console.log('post() done.');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue