xcraft-core-utils 4.18.1 → 4.18.2

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/lib/rest.js +6 -2
  2. package/package.json +1 -1
package/lib/rest.js CHANGED
@@ -136,11 +136,15 @@ class RestAPI {
136
136
  /**
137
137
  * @param {string} query
138
138
  * @param {object} payload
139
+ * @param {object} [options]
139
140
  * @returns {object}
140
141
  */
141
- async _post(query, payload) {
142
+ async _post(query, payload, options = {}) {
142
143
  const {got} = await import('got');
143
- const result = await got.post(query, this.#buildOptions({json: payload}));
144
+ const result = await got.post(
145
+ query,
146
+ this.#buildOptions({json: payload, ...options})
147
+ );
144
148
  return result.body;
145
149
  }
146
150
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcraft-core-utils",
3
- "version": "4.18.1",
3
+ "version": "4.18.2",
4
4
  "description": "Xcraft utils",
5
5
  "main": "index.js",
6
6
  "engines": {