@verii/http-client 1.1.0-pre.1762297666 → 1.1.0-pre.1762324415

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/client.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verii/http-client",
3
- "version": "1.1.0-pre.1762297666",
3
+ "version": "1.1.0-pre.1762324415",
4
4
  "description": "HTTP client for Verii network",
5
5
  "repository": "https://github.com/LFDT-Verii/core",
6
6
  "main": "index.js",
@@ -42,5 +42,5 @@
42
42
  "lib"
43
43
  ]
44
44
  },
45
- "gitHead": "59df273cfec3582c963d9c0f6883965649d39ebd"
45
+ "gitHead": "38a4d47eb98cfce5679e27bd7a2634295ceaa688"
46
46
  }
package/src/client.js CHANGED
@@ -23,6 +23,7 @@ const {
23
23
  } = require('undici');
24
24
  const { createOidcInterceptor } = require('undici-oidc-interceptor');
25
25
  const { map } = require('lodash/fp');
26
+ const { isObject } = require('lodash');
26
27
  const pkg = require('../package.json');
27
28
 
28
29
  const USER_AGENT_HEADER = `${pkg.name}/${pkg.version}`;
@@ -178,7 +179,7 @@ const initHttpClient = (options) => {
178
179
  HTTP_VERBS.POST,
179
180
  host,
180
181
  context,
181
- JSON.stringify(payload)
182
+ isObject(payload) ? JSON.stringify(payload) : payload
182
183
  ),
183
184
  delete: (url, reqOptions) =>
184
185
  request(url, reqOptions, HTTP_VERBS.DELETE, host, context),