fix(now supports request body): update
This commit is contained in:
parent
869d077844
commit
35b3ff8021
@ -26,6 +26,7 @@ export class WebRequest {
|
|||||||
urlArg: string | string[],
|
urlArg: string | string[],
|
||||||
optionsArg: {
|
optionsArg: {
|
||||||
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||||
|
body?: any;
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
let allUrls: string[];
|
let allUrls: string[];
|
||||||
@ -70,7 +71,8 @@ export class WebRequest {
|
|||||||
method: optionsArg.method,
|
method: optionsArg.method,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
}
|
},
|
||||||
|
body: optionsArg.body
|
||||||
});
|
});
|
||||||
console.log(`${urlToUse} answers with status: ${response.status}`);
|
console.log(`${urlToUse} answers with status: ${response.status}`);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user