froth-webdriverio-framework 3.0.130 → 3.0.131
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.
|
@@ -19,11 +19,12 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
|
|
|
19
19
|
console.log("Body Type:", body_type);
|
|
20
20
|
console.log("method:", method);
|
|
21
21
|
console.log("headers:", headers);
|
|
22
|
+
|
|
22
23
|
if (body_type === "raw" && payloaddetails && Object.keys(payloaddetails).length > 0) {
|
|
23
24
|
console.log("Payload (JSON):", JSON.stringify(payloaddetails));
|
|
24
25
|
body = JSON.stringify(payloaddetails);
|
|
25
26
|
console.log("Payload (raw):", body);
|
|
26
|
-
} else if (body_type === "
|
|
27
|
+
} else if (body_type === "form-data" && payloaddetails) {
|
|
27
28
|
body = await jsonToFormData(payloaddetails);
|
|
28
29
|
console.log("Payload (FormData):", body);
|
|
29
30
|
for (let [key, value] of body.entries()) {
|
|
@@ -52,7 +53,7 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
|
|
|
52
53
|
// });
|
|
53
54
|
// }
|
|
54
55
|
|
|
55
|
-
console.log("Response Data:", response);
|
|
56
|
+
console.log("Response Data:", response.data);
|
|
56
57
|
|
|
57
58
|
} catch (error) {
|
|
58
59
|
console.error('Error during API call in call api menthod:', error);
|