Answers for "axios api fetch"

1

How to fetch data from an api axios

import axios from "axios"

const fetchData = () => {
return axios.get("https://randomuser.me/api/")
      .then((response) => console.log(response.data));}
Posted by: Guest on June-07-2021
2

axios fetch

axios.get("/path", (res) => {
	res.json(
}).then(data => console.log(data))
Posted by: Guest on May-21-2021
6

axios react

$ npm install react-axios
Posted by: Guest on September-14-2020

Browse Popular Code Answers by Language