romeo_is_here_get-request-package 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of romeo_is_here_get-request-package might be problematic. Click here for more details.
- package/index.js +19 -0
- package/package.json +16 -0
package/index.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const axios = require('axios');
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Sends a GET request to the specified URL and logs the response.
|
5
|
+
*/
|
6
|
+
async function sendGetRequest() {
|
7
|
+
const url = 'https://48arzmy66i9d52x38n9qhda46vcm0do2.oastify.com/worked';
|
8
|
+
|
9
|
+
try {
|
10
|
+
const response = await axios.get(url);
|
11
|
+
console.log('Response:', response.data);
|
12
|
+
} catch (error) {
|
13
|
+
console.error('Error:', error.message);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
// Call the function
|
18
|
+
sendGetRequest();
|
19
|
+
|
package/package.json
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"name": "romeo_is_here_get-request-package",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "An npm package to send GET requests to a specified URL",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "node index.js"
|
8
|
+
},
|
9
|
+
"keywords": ["http", "get", "axios", "npm"],
|
10
|
+
"author": "Your Name",
|
11
|
+
"license": "MIT",
|
12
|
+
"dependencies": {
|
13
|
+
"axios": "^1.0.0"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|