【发布时间】:2021-06-21 23:49:06
【问题描述】:
import Axios from 'axios';
import './App.css';
function App() {
const [userNameReg, setUserNameReg] = useState('')
const [passwordReg, setPasswordReg] = useState('')
const register = () =>{
Axios.post("http://localhost3001/register", {
username : userNameReg,
password : passwordReg,
}).then((res) =>{
console.log(res);
});
};
- POST http://localhost3001/register net::ERR_NAME_NOT_RESOLVED
- 未捕获(承诺)错误:网络错误
- 在 createError (createError.js:16) 时
- 在 XMLHttpRequest.handleError (xhr.js:84) 处
【问题讨论】:
标签: javascript html node.js reactjs express