ywana-core8 0.0.372 → 0.0.375

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.
@@ -8,24 +8,6 @@ import { ReactNotifications, Store } from 'react-notifications-component';
8
8
  import 'react-notifications-component/dist/theme.css';
9
9
  import equal from 'deep-equal';
10
10
 
11
- function _extends() {
12
- _extends = Object.assign || function (target) {
13
- for (var i = 1; i < arguments.length; i++) {
14
- var source = arguments[i];
15
-
16
- for (var key in source) {
17
- if (Object.prototype.hasOwnProperty.call(source, key)) {
18
- target[key] = source[key];
19
- }
20
- }
21
- }
22
-
23
- return target;
24
- };
25
-
26
- return _extends.apply(this, arguments);
27
- }
28
-
29
11
  function _catch$2(body, recover) {
30
12
  try {
31
13
  var result = body();
@@ -47,16 +29,19 @@ var fetchAsync = function fetchAsync(method, URL, body, token, headers) {
47
29
 
48
30
  try {
49
31
  console.log('FETCH', method, URL);
32
+ var requestHeaders = Object.assign({}, {
33
+ "Accept": "application/json",
34
+ "Content-Type": "application/json",
35
+ "x-access-token": token
36
+ }, headers);
50
37
  var request = {
51
38
  method: method,
52
39
  mode: 'cors',
53
- headers: _extends({
54
- "Accept": "application/json",
55
- "Content-Type": "application/json",
56
- "x-access-token": token
57
- }, headers),
40
+ headers: requestHeaders,
58
41
  body: body
59
42
  };
43
+ console.log("HTTP Client", request);
44
+ if (headers) request.headers = request.headers;
60
45
  return Promise.resolve(_catch$2(function () {
61
46
  return Promise.resolve(fetch(URL, request)).then(function (response) {
62
47
  var _exit;
@@ -507,6 +492,24 @@ var Header = function Header(props) {
507
492
  }, props.children));
508
493
  };
509
494
 
495
+ function _extends() {
496
+ _extends = Object.assign || function (target) {
497
+ for (var i = 1; i < arguments.length; i++) {
498
+ var source = arguments[i];
499
+
500
+ for (var key in source) {
501
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
502
+ target[key] = source[key];
503
+ }
504
+ }
505
+ }
506
+
507
+ return target;
508
+ };
509
+
510
+ return _extends.apply(this, arguments);
511
+ }
512
+
510
513
  /**
511
514
  * List
512
515
  */