froth-webdriverio-framework 4.0.63 → 4.0.65

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.
@@ -4,10 +4,10 @@ const amendToBrowserstack = require("../froth_api_calls/browsersatckSessionInfo"
4
4
 
5
5
  async function callapi(methodtype, api_url, queryParams, payloaddetails, body_type, authentication, headersdetails, attachments) {
6
6
  let response;
7
- if (queryParams && Object.keys(queryParams).length > 0) {
8
- const queryString = new URLSearchParams(queryParams).toString();
9
- api_url += `?${queryString}`;
10
- }
7
+ // if (queryParams && Object.keys(queryParams).length > 0) {
8
+ // const queryString = new URLSearchParams(queryParams).toString();
9
+ // api_url += `?${queryString}`;
10
+ // }
11
11
  console.log("Final API URL:", api_url);
12
12
 
13
13
 
@@ -44,13 +44,14 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
44
44
  const isBodyEmpty =
45
45
  body === null ||
46
46
  body === undefined ||
47
- body === '' ||
48
- (typeof body === 'object' && Object.keys(body).length === 0);
47
+ body === ''
48
+
49
49
 
50
50
  if (!isBodyEmpty) {
51
51
  config.data = body;
52
52
  }
53
-
53
+ console.log("body:", body);
54
+ console.log("Config for API call:", config);
54
55
  response = await axios(config);
55
56
 
56
57
  // response = await axios({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "4.0.63",
3
+ "version": "4.0.65",
4
4
  "readme": "WebdriverIO Integration",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",