api-def 0.6.2-alpha.3 → 0.6.2-alpha.4

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.
@@ -135,9 +135,9 @@ var RequestContext = /** @class */ (function () {
135
135
  for (var _i = 0, _a = Object.keys(this.computedConfig.body); _i < _a.length; _i++) {
136
136
  var key = _a[_i];
137
137
  var value = this.computedConfig.body[key];
138
- searchParams.set(key, value === null || value === void 0 ? void 0 : value.toString());
138
+ searchParams.append(key, value === null || value === void 0 ? void 0 : value.toString());
139
139
  }
140
- this.parsedBody = searchParams.toString();
140
+ this.parsedBody = searchParams;
141
141
  }
142
142
  else {
143
143
  this.parsedBody = this.computedConfig.body;
@@ -14,6 +14,7 @@ var isRequestError = function (error) {
14
14
  exports.isRequestError = isRequestError;
15
15
  var convertToRequestError = function (config) {
16
16
  var error = config.error, context = config.context, response = config.response, code = config.code;
17
+ var body = context.getParsedBody();
17
18
  var resultError = Object.assign(error, {
18
19
  name: "RequestError",
19
20
  response: response,
@@ -23,7 +24,7 @@ var convertToRequestError = function (config) {
23
24
  url: context.getRequestUrl().href,
24
25
  query: context.computedConfig.query,
25
26
  headers: context.computedConfig.headers,
26
- body: context.getParsedBody(),
27
+ body: body,
27
28
  },
28
29
  });
29
30
  delete resultError.config;
@@ -133,9 +133,9 @@ var RequestContext = /** @class */ (function () {
133
133
  for (var _i = 0, _a = Object.keys(this.computedConfig.body); _i < _a.length; _i++) {
134
134
  var key = _a[_i];
135
135
  var value = this.computedConfig.body[key];
136
- searchParams.set(key, value === null || value === void 0 ? void 0 : value.toString());
136
+ searchParams.append(key, value === null || value === void 0 ? void 0 : value.toString());
137
137
  }
138
- this.parsedBody = searchParams.toString();
138
+ this.parsedBody = searchParams;
139
139
  }
140
140
  else {
141
141
  this.parsedBody = this.computedConfig.body;
@@ -10,6 +10,7 @@ export var isRequestError = function (error) {
10
10
  };
11
11
  export var convertToRequestError = function (config) {
12
12
  var error = config.error, context = config.context, response = config.response, code = config.code;
13
+ var body = context.getParsedBody();
13
14
  var resultError = Object.assign(error, {
14
15
  name: "RequestError",
15
16
  response: response,
@@ -19,7 +20,7 @@ export var convertToRequestError = function (config) {
19
20
  url: context.getRequestUrl().href,
20
21
  query: context.computedConfig.query,
21
22
  headers: context.computedConfig.headers,
22
- body: context.getParsedBody(),
23
+ body: body,
23
24
  },
24
25
  });
25
26
  delete resultError.config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "api-def",
3
- "version": "0.6.2-alpha.3",
3
+ "version": "0.6.2-alpha.4",
4
4
  "description": "Typed API definitions with middleware support",
5
5
  "main": "cjs/index.js",
6
6
  "types": "esm/index.d.ts",