gd-sprest 9.3.9 → 9.4.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/mapper/v2.js +10 -0
- package/build/rest.js +1 -1
- package/build/utils/batch.js +3 -5
- package/dist/gd-sprest.js +1 -1
- package/dist/gd-sprest.min.js +1 -1
- package/package.json +2 -2
package/build/mapper/v2.js
CHANGED
|
@@ -5506,6 +5506,11 @@ exports.MapperV2 = {
|
|
|
5506
5506
|
},
|
|
5507
5507
|
},
|
|
5508
5508
|
lists: {
|
|
5509
|
+
add: {
|
|
5510
|
+
argNames: ["values"],
|
|
5511
|
+
name: "",
|
|
5512
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
5513
|
+
},
|
|
5509
5514
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
5510
5515
|
},
|
|
5511
5516
|
listItem: {
|
|
@@ -5552,6 +5557,11 @@ exports.MapperV2 = {
|
|
|
5552
5557
|
},
|
|
5553
5558
|
},
|
|
5554
5559
|
listItems: {
|
|
5560
|
+
add: {
|
|
5561
|
+
argNames: ["fields"],
|
|
5562
|
+
name: "",
|
|
5563
|
+
requestType: utils_1.RequestType.PostWithArgsInBody
|
|
5564
|
+
},
|
|
5555
5565
|
query: { argNames: ["oData"], requestType: utils_1.RequestType.OData },
|
|
5556
5566
|
},
|
|
5557
5567
|
listItemVersion: {
|
package/build/rest.js
CHANGED
package/build/utils/batch.js
CHANGED
|
@@ -156,23 +156,21 @@ var Batch = /** @class */ (function () {
|
|
|
156
156
|
var requiresChangeset = request && request.targetInfo.requestMethod != "GET";
|
|
157
157
|
if (requiresChangeset) {
|
|
158
158
|
// Create a change set
|
|
159
|
-
batch.push("Content-Type: multipart/mixed; boundary=" + request.changesetId);
|
|
160
|
-
batch.push("");
|
|
161
|
-
batch.push("--" + request.changesetId);
|
|
162
159
|
batch.push("Content-Type: application/http");
|
|
163
160
|
batch.push("Content-Transfer-Encoding: binary");
|
|
164
161
|
batch.push("");
|
|
165
162
|
batch.push(request.targetInfo.requestMethod + " " + request.targetInfo.requestUrl + " HTTP/1.1");
|
|
166
|
-
batch.push("
|
|
163
|
+
batch.push("Accept: application/json");
|
|
164
|
+
batch.push("Content-Type: application/json");
|
|
167
165
|
// See if we are making a delete/update
|
|
168
166
|
if (request.targetInfo.requestMethod == "DELETE" || request.targetInfo.requestMethod == "MERGE") {
|
|
169
167
|
// Append the header for deleting/updating
|
|
170
168
|
batch.push("IF-MATCH: *");
|
|
171
169
|
}
|
|
170
|
+
request.targetInfo.requestData ? batch.push("Content-Length: " + request.targetInfo.requestData.length) : null;
|
|
172
171
|
batch.push("");
|
|
173
172
|
request.targetInfo.requestData ? batch.push(request.targetInfo.requestData) : null;
|
|
174
173
|
batch.push("");
|
|
175
|
-
batch.push("--" + request.changesetId + "--");
|
|
176
174
|
}
|
|
177
175
|
else {
|
|
178
176
|
// Create a change set
|