froth-webdriverio-framework 3.0.125 → 3.0.126

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.
@@ -31,6 +31,17 @@ async function callapi(methodtype, api_url, queryParams, payloaddetails, body_ty
31
31
 
32
32
  // console.log("options:", JSON.stringify(options, null, 2));
33
33
  // Send the request
34
+ if (method === 'GET' && body) {
35
+ console.warn("Using X-HTTP-Method-Override for GET with body.");
36
+ response = await fetch(api_url, {
37
+ method: 'POST', // Override to POST
38
+ headers: {
39
+ ...headers,
40
+ 'X-HTTP-Method-Override': 'GET' // Trick the API into treating it as GET
41
+ },
42
+ body: body
43
+ });
44
+ } else
34
45
  response = await fetch(api_url, {method,headers, body});
35
46
 
36
47
  console.log("Response Data:", response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "3.0.125",
3
+ "version": "3.0.126",
4
4
 
5
5
  "readme": "WebdriverIO Integration",
6
6
  "description": "WebdriverIO and BrowserStack App Automate",