📜  使用 axios http put 方法的 udpdate 记录 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:49.857000             🧑  作者: Mango

代码示例1
update(e) {
        e.preventDefault();
        const employee = {
            name: this.state.name,
            age: this.state.age,
            salary: this.state.salary,
        }
        axios.put('http://dummy.restapiexample.com/api/v1/update/{this.state.id}', employee)
        .then(res => console.log(res.data));
    }