ywana-core8 0.0.373 → 0.0.374

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.
package/dist/index.cjs CHANGED
@@ -37,16 +37,23 @@ var fetchAsync = function fetchAsync(method, URL, body, token, headers) {
37
37
 
38
38
  try {
39
39
  console.log('FETCH', method, URL);
40
+ var requestHeaders = Object.assign({}, {
41
+ "Accept": "application/json",
42
+ "Content-Type": "application/json",
43
+ "x-access-token": token
44
+ }, headers);
40
45
  var request = {
41
46
  method: method,
42
47
  mode: 'cors',
43
- headers: Object.assign({
48
+ headers: {
44
49
  "Accept": "application/json",
45
50
  "Content-Type": "application/json",
46
51
  "x-access-token": token
47
- }, headers),
52
+ },
48
53
  body: body
49
54
  };
55
+ console.log("HTTP Client", request);
56
+ if (headers) request.headers = request.headers;
50
57
  return Promise.resolve(_catch$2(function () {
51
58
  return Promise.resolve(fetch(URL, request)).then(function (response) {
52
59
  var _exit;