Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

udpdate records using axios http put method

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));
    }
Source by www.js-tutorials.com #
 
PREVIOUS NEXT
Tagged: #udpdate #records #axios #http #put #method
ADD COMMENT
Topic
Name
7+9 =