text: function XhttpApi(XApiAuthCookieValue){
  
      this.x_api_auth = XApiAuthCookieValue;
  
      this.getRequest = function (url = "") {
          // Default options are marked with *
          return fetch(url, {
              method: "GET", // *GET, POST, PUT, DELETE, etc.
              mode: "cors", // no-cors, cors, *same-origin
              cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
              credentials: "same-origin", // include, same-origin, *omit
              headers: {
                  "Content-Type": "application/json",
                  "X-API-AUTH": this.x_api_auth
                  // "Content-Type": "application/x-www-form-urlencoded",
              },
              redirect: "follow", // manual, *follow, error
              referrer: "no-referrer", // no-referrer, *client
              // body: JSON.stringify(data), // body data type must match "Content-Type" header
          })
              .then(response => response.json()); // parses response to JSON
      };
  
      this.deleteRequest = function (url = "") {
          // Default options are marked with *
          return fetch(url, {
              method: "DELETE", // *GET, POST, PUT, DELETE, etc.
              mode: "cors", // no-cors, cors, *same-origin
              cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
              credentials: "same-origin", // include, same-origin, *omit
              headers: {
                  "Content-Type": "application/json",
                  "X-API-AUTH": this.x_api_auth
                  // "Content-Type": "application/x-www-form-urlencoded",
              },
              redirect: "follow", // manual, *follow, error
              referrer: "no-referrer", // no-referrer, *client
              // body: JSON.stringify(data), // body data type must match "Content-Type" header
          });
             // .then(response =>return response);
      };
  
      this.postRequest = function (url = "", data = {}) {
          // Default options are marked with *
          return fetch(url, {
              method: "POST", // *GET, POST, PUT, DELETE, etc.
              mode: "cors", // no-cors, cors, *same-origin
              cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
              credentials: "same-origin", // include, same-origin, *omit
              headers: {
                  "Content-Type": "application/json",
                  "X-API-AUTH": this.x_api_auth
                  // "Content-Type": "application/x-www-form-urlencoded",
              },
              redirect: "follow", // manual, *follow, error
              referrer: "no-referrer", // no-referrer, *client
              body: JSON.stringify(data), // body data type must match "Content-Type" header
          })
              .then(response => response.json()); // parses response to JSON
      };
  
  }