n8n-nodes-tenable 1.0.2 → 1.0.3

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.
@@ -11,15 +11,16 @@ async function tenableApiRequest(method, endpoint, body = {}, qs = {}) {
11
11
  url: `${credentials.baseUrl}${endpoint}`,
12
12
  headers: {
13
13
  'Accept': 'application/json',
14
- 'Content-Type': 'application/json',
15
14
  },
16
15
  qs,
17
- body,
18
- json: true,
19
16
  };
20
- // Only remove body for GET requests - POST/PUT requests may need empty body
21
- if (Object.keys(body).length === 0 && method === 'GET') {
22
- delete options.body;
17
+ // For non-GET requests, always send JSON body (even if empty)
18
+ if (method !== 'GET') {
19
+ options.body = JSON.stringify(body);
20
+ options.headers = {
21
+ ...options.headers,
22
+ 'Content-Type': 'application/json',
23
+ };
23
24
  }
24
25
  if (Object.keys(qs).length === 0) {
25
26
  delete options.qs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-tenable",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "n8n nodes for Tenable Vulnerability Management and Tenable One APIs",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",