gd-sprest 8.9.9 → 9.0.0

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/build/rest.js CHANGED
@@ -9,7 +9,7 @@ var sptypes_1 = require("./sptypes");
9
9
  * SharePoint REST Library
10
10
  */
11
11
  exports.$REST = {
12
- __ver: 8.99,
12
+ __ver: 9.00,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,
@@ -25,11 +25,18 @@ var TargetInfo = /** @class */ (function () {
25
25
  this.props.requestType == _1.RequestType.GraphGet ||
26
26
  this.props.requestType == _1.RequestType.GraphGetReplace ||
27
27
  this.props.requestType == _1.RequestType.OData ? "GET" : "POST");
28
- // Set the request url
29
- this.requestUrl = [
30
- this.props.url || "",
31
- this.props.endpoint
32
- ].join('/').replace(/\/\//g, '/').replace(/\/$/, '');
28
+ // Check the endpoint
29
+ if (this.props.endpoint.indexOf("http") == 0) {
30
+ // Set the request url
31
+ this.requestUrl = this.props.endpoint;
32
+ }
33
+ else {
34
+ // Set the request url
35
+ this.requestUrl = [
36
+ this.props.url || "",
37
+ this.props.endpoint
38
+ ].join('/').replace(/\/\//g, '/').replace(/\/$/, '');
39
+ }
33
40
  }
34
41
  else {
35
42
  // Set the request url