my-npm-axios-dog
v1.0.0
Published
A small package that fetches random dog images using axios.
Downloads
9
Readme
my-npm-axios-dog
An npm package fetching a random dog image from https://dog.ceo/dog-api/ using axios from axios-http.com
How to use
Install with your terminal:
npm i my-npm-axios-dogExample how to use in your code.
const { getRandomDogImage } = require('my-npm-axios-dog');
async function main() {
try {
const imageUrl = await getRandomDogImage();
console.log(imageUrl);
} catch (error) {
console.error('Error:', error.message);
}
}
main();