@nsshunt/stsrest01client 1.0.5 → 1.0.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.
@@ -3613,7 +3613,10 @@ class AxiosClient {
3613
3613
  } else {
3614
3614
  accessToken = await __privateGet(this, _options).GetAccessToken();
3615
3615
  }
3616
- const requestConfig = new STSAxiosConfig(url, httpVerb).withAuthHeaders(accessToken, __privateGet(this, _DUMMY_USER)).withData(filters ? filters : resource ? resource : void 0);
3616
+ let requestConfig = new STSAxiosConfig(url, httpVerb).withAuthHeaders(accessToken, __privateGet(this, _DUMMY_USER));
3617
+ if (!(httpVerb.localeCompare("get") === 0 || httpVerb.localeCompare("head") === 0)) {
3618
+ requestConfig.withData(filters ? filters : resource ? resource : void 0);
3619
+ }
3617
3620
  if (isNode && __privateGet(this, _options).agentManager) {
3618
3621
  requestConfig.withAgentManager(__privateGet(this, _options).agentManager);
3619
3622
  }
@@ -3744,7 +3747,7 @@ class STSRest01Client {
3744
3747
  // --- [ Resource ] -------------------------------------------------------------------------------------------------------------------
3745
3748
  // --- [ POST.Resource ] -------------------------------------------------------------------------------------------------------------------
3746
3749
  __publicField(this, "PostResourceAR", async (resource, errorCb) => {
3747
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources`;
3750
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources`;
3748
3751
  return await __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resource, null, null, errorCb);
3749
3752
  });
3750
3753
  __publicField(this, "PostResourceDBR", async (resource, errorCb) => {
@@ -3757,7 +3760,7 @@ class STSRest01Client {
3757
3760
  });
3758
3761
  // --- [ PUT.Resource ] -------------------------------------------------------------------------------------------------------------------
3759
3762
  __publicField(this, "PutResourceAR", async (resource, errorCb) => {
3760
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resource.resname}`;
3763
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
3761
3764
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", resource, null, null, errorCb);
3762
3765
  });
3763
3766
  __publicField(this, "PutResourceDBR", async (resource, errorCb) => {
@@ -3770,7 +3773,7 @@ class STSRest01Client {
3770
3773
  });
3771
3774
  // --- [ PATCH.Resource ] -------------------------------------------------------------------------------------------------------------------
3772
3775
  __publicField(this, "PatchResourceAR", async (resource, errorCb) => {
3773
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resource.resname}`;
3776
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
3774
3777
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resource, null, null, errorCb);
3775
3778
  });
3776
3779
  __publicField(this, "PatchResourceDBR", async (resource, errorCb) => {
@@ -3783,7 +3786,7 @@ class STSRest01Client {
3783
3786
  });
3784
3787
  // --- [ DELETE.Resource ] -------------------------------------------------------------------------------------------------------------------
3785
3788
  __publicField(this, "DeleteResourceAR", async (resource, errorCb) => {
3786
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resource.resname}`;
3789
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
3787
3790
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resource, null, null, errorCb);
3788
3791
  });
3789
3792
  __publicField(this, "DeleteResourceDBR", async (resource, errorCb) => {
@@ -3796,7 +3799,7 @@ class STSRest01Client {
3796
3799
  });
3797
3800
  // --- [ GET.Resource ] -------------------------------------------------------------------------------------------------------------------
3798
3801
  __publicField(this, "GetResourceAR", async (resource, filters, errorCb) => {
3799
- let url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resource.resname}`;
3802
+ let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}`;
3800
3803
  if (filters && filters.localeCompare("") !== 0) {
3801
3804
  url = `${url}?${filters}`;
3802
3805
  }
@@ -3812,7 +3815,7 @@ class STSRest01Client {
3812
3815
  });
3813
3816
  // --- [ GET.Resources ] -------------------------------------------------------------------------------------------------------------------
3814
3817
  __publicField(this, "GetResourcesAR", async (filters, errorCb) => {
3815
- let url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources`;
3818
+ let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources`;
3816
3819
  if (filters && filters.localeCompare("") !== 0) {
3817
3820
  url = `${url}?${filters}`;
3818
3821
  }
@@ -3829,7 +3832,7 @@ class STSRest01Client {
3829
3832
  // --- [ Entity ] -------------------------------------------------------------------------------------------------------------------
3830
3833
  // --- [ POST.Entitiy ] -------------------------------------------------------------------------------------------------------------------
3831
3834
  __publicField(this, "PostEntityAR", async (resourceEntity, errorCb) => {
3832
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities`;
3835
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities`;
3833
3836
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "post", resourceEntity, null, null, errorCb);
3834
3837
  });
3835
3838
  __publicField(this, "PostEntityDBR", async (resourceEntity, errorCb) => {
@@ -3842,7 +3845,7 @@ class STSRest01Client {
3842
3845
  });
3843
3846
  // --- [ PUT.Entity ] -------------------------------------------------------------------------------------------------------------------
3844
3847
  __publicField(this, "PutEntityAR", async (entity, errorCb) => {
3845
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
3848
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${entity.resname}/entities/${entity.entname}`;
3846
3849
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "put", entity, null, null, errorCb);
3847
3850
  });
3848
3851
  __publicField(this, "PutEntityDBR", async (resourceEntity, errorCb) => {
@@ -3855,7 +3858,7 @@ class STSRest01Client {
3855
3858
  });
3856
3859
  // --- [ PATCH.Entity ] -------------------------------------------------------------------------------------------------------------------
3857
3860
  __publicField(this, "PatchEntityAR", async (resourceEntity, errorCb) => {
3858
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3861
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3859
3862
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "patch", resourceEntity, null, null, errorCb);
3860
3863
  });
3861
3864
  __publicField(this, "PatchEntityDBR", async (resourceEntity, errorCb) => {
@@ -3868,7 +3871,7 @@ class STSRest01Client {
3868
3871
  });
3869
3872
  // --- [ DELETE.Entity ] -------------------------------------------------------------------------------------------------------------------
3870
3873
  __publicField(this, "DeleteEntityAR", async (resourceEntity, errorCb) => {
3871
- const url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3874
+ const url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3872
3875
  return __privateGet(this, _axiosClient).InvokeResourceAPI(url, "delete", resourceEntity, null, null, errorCb);
3873
3876
  });
3874
3877
  __publicField(this, "DeleteEntityDBR", async (resourceEntity, errorCb) => {
@@ -3881,7 +3884,7 @@ class STSRest01Client {
3881
3884
  });
3882
3885
  // --- [ GET.Entity ] -------------------------------------------------------------------------------------------------------------------
3883
3886
  __publicField(this, "GetEntityAR", async (resourceEntity, filters, errorCb) => {
3884
- let url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3887
+ let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resourceEntity.resname}/entities/${resourceEntity.entname}`;
3885
3888
  if (filters && filters.localeCompare("") !== 0) {
3886
3889
  url = `${url}?${filters}`;
3887
3890
  }
@@ -3897,7 +3900,7 @@ class STSRest01Client {
3897
3900
  });
3898
3901
  // --- [ GET.Entities ] -------------------------------------------------------------------------------------------------------------------
3899
3902
  __publicField(this, "GetEntitiesAR", async (resource, filters, errorCb) => {
3900
- let url = `${__privateGet(this, _options2).endpoint}:${goptions.rest01port}${goptions.rest01apiroot}/resources/${resource.resname}/entities`;
3903
+ let url = `${__privateGet(this, _options2).endpoint}${goptions.rest01apiroot}/resources/${resource.resname}/entities`;
3901
3904
  if (filters && filters.localeCompare("") !== 0) {
3902
3905
  url = `${url}?${filters}`;
3903
3906
  }