froth-webdriverio-framework 3.0.120 → 3.0.121
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.
|
@@ -14,6 +14,7 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
|
|
|
14
14
|
let method = methodtype;
|
|
15
15
|
let headers = await formheaders(authentication, headersdetails, body_type);
|
|
16
16
|
let body = null;
|
|
17
|
+
console.log("Body Type:", body_type);
|
|
17
18
|
if (body_type === "raw" && payloaddetails && Object.keys(payloaddetails).length > 0) {
|
|
18
19
|
console.log("Payload (JSON):", JSON.stringify(payloaddetails));
|
|
19
20
|
body = JSON.stringify(payloaddetails);
|
|
@@ -30,9 +31,8 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
|
|
|
30
31
|
|
|
31
32
|
// console.log("options:", JSON.stringify(options, null, 2));
|
|
32
33
|
// Send the request
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
response = await res.json();
|
|
34
|
+
const response = await fetch(api_url, {method,headers, body});
|
|
35
|
+
|
|
36
36
|
console.log("Response Data:", response);
|
|
37
37
|
|
|
38
38
|
} catch (error) {
|