Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 6eea3aa

Browse files
added files
1 parent d73ab69 commit 6eea3aa

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const Http = new XMLHttpRequest();
2+
3+
const url = 'https://xkcd.now.sh/?comic=latest';
4+
Http.open('GET', url);
5+
Http.send();
6+
7+
const axios = require('axios').default;
8+
9+
axios
10+
.get('https://xkcd.now.sh/?comic=latest')
11+
.then((resp) => {
12+
console.log(resp.data);
13+
})
14+
.catch((err) => {
15+
// Handle Error Here
16+
console.error(err);
17+
});
18+
const image = document.createElement('img');
19+
var x = document.getElementById('img');
20+
21+
Http.onreadystatechange = (e) => {
22+
console.log(Http.responseText);
23+
};

0 commit comments

Comments
 (0)