@modern-js/create-request 2.5.1-alpha.5 → 2.5.1-alpha.7

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.
@@ -92,7 +92,7 @@ const createRequest = (path, method, port, httpMethodDecider = "functionName", f
92
92
  args
93
93
  });
94
94
  headers = {
95
- ["Content-Type"]: "application/json"
95
+ "Content-Type": "application/json"
96
96
  };
97
97
  }
98
98
  return fetcher(finalURL, {
package/dist/cjs/node.js CHANGED
@@ -97,7 +97,7 @@ const createRequest = (path, method, port, httpMethodDecider = "functionName", f
97
97
  url = path;
98
98
  body = args;
99
99
  headers = {
100
- ["Content-Type"]: "application/json"
100
+ "Content-Type": "application/json"
101
101
  };
102
102
  }
103
103
  const fetcher = realRequest || originFetch;
@@ -35,19 +35,6 @@ function _asyncToGenerator(fn) {
35
35
  });
36
36
  };
37
37
  }
38
- function _defineProperty(obj, key, value) {
39
- if (key in obj) {
40
- Object.defineProperty(obj, key, {
41
- value: value,
42
- enumerable: true,
43
- configurable: true,
44
- writable: true
45
- });
46
- } else {
47
- obj[key] = value;
48
- }
49
- return obj;
50
- }
51
38
  function _instanceof(left, right) {
52
39
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
53
40
  return !!right[Symbol.hasInstance](left);
@@ -243,7 +230,9 @@ var createRequest = function(path, method, port) {
243
230
  body = JSON.stringify({
244
231
  args: args
245
232
  });
246
- headers = _defineProperty({}, "Content-Type", "application/json");
233
+ headers = {
234
+ "Content-Type": "application/json"
235
+ };
247
236
  }
248
237
  return [
249
238
  2,
package/dist/esm/node.js CHANGED
@@ -6,19 +6,6 @@ function _arrayLikeToArray(arr, len) {
6
6
  function _arrayWithoutHoles(arr) {
7
7
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
8
8
  }
9
- function _defineProperty(obj, key, value) {
10
- if (key in obj) {
11
- Object.defineProperty(obj, key, {
12
- value: value,
13
- enumerable: true,
14
- configurable: true,
15
- writable: true
16
- });
17
- } else {
18
- obj[key] = value;
19
- }
20
- return obj;
21
- }
22
9
  function _iterableToArray(iter) {
23
10
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
24
11
  }
@@ -133,7 +120,9 @@ var createRequest = function(path, method, port) {
133
120
  } else {
134
121
  url = path;
135
122
  body = args;
136
- headers = _defineProperty({}, "Content-Type", "application/json");
123
+ headers = {
124
+ "Content-Type": "application/json"
125
+ };
137
126
  }
138
127
  var fetcher = realRequest || originFetch;
139
128
  return fetcher(url, {
@@ -63,7 +63,7 @@ const createRequest = (path, method, port, httpMethodDecider = "functionName", f
63
63
  args
64
64
  });
65
65
  headers = {
66
- ["Content-Type"]: "application/json"
66
+ "Content-Type": "application/json"
67
67
  };
68
68
  }
69
69
  return fetcher(finalURL, {
@@ -68,7 +68,7 @@ const createRequest = (path, method, port, httpMethodDecider = "functionName", f
68
68
  url = path;
69
69
  body = args;
70
70
  headers = {
71
- ["Content-Type"]: "application/json"
71
+ "Content-Type": "application/json"
72
72
  };
73
73
  }
74
74
  const fetcher = realRequest || originFetch;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.5.1-alpha.5",
14
+ "version": "2.5.1-alpha.7",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/cjs/index.js",