Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
0a423e10cc | |||
35b3ff8021 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/webrequest",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/webrequest",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"private": false,
|
||||
"description": "securely request from browsers",
|
||||
"main": "dist/index.js",
|
||||
|
@ -26,6 +26,7 @@ export class WebRequest {
|
||||
urlArg: string | string[],
|
||||
optionsArg: {
|
||||
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
body?: any;
|
||||
}
|
||||
) {
|
||||
let allUrls: string[];
|
||||
@ -70,7 +71,8 @@ export class WebRequest {
|
||||
method: optionsArg.method,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
},
|
||||
body: optionsArg.body
|
||||
});
|
||||
console.log(`${urlToUse} answers with status: ${response.status}`);
|
||||
|
||||
|
Reference in New Issue
Block a user