javascript
reactjs axios get example
componentDidMount() {
// Simple PUT request with a JSON body using axios
const article = { title: 'React PUT Request Example' };
axios.put('https://reqres.in/api/articles/1', article)
.then(response => this.setState({ updatedAt: response.data.updatedAt }));
}
Was this helpful?
Similar Posts
- Send Form Data in axios POST request
- Get Pseudo elements using Javascript
- Get all child elements of parent element in javascript
- Get first 10 words from string javascript
- Get Top MAX and MIN itens inside array Javascript
- Get a bigger word from a javascript array
- Get total sum of specif attribute inside of array of objects