UNPKG

1.51 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.toBatchChangeSetV4 = exports.toBatchRetrieveBodyV4 = exports.toBatchChangeSet = exports.toBatchRetrieveBody = void 0;
4var odata_common_1 = require("../odata-common");
5/**
6 * @deprecated Since v1.30.0. Use [[serializeRequest]] instead.
7 * Build a string as the request body of the retrieve request.
8 * Below is an example of the generated body, where the two empty line are mandatory to make the request valid.
9 * *** example starts ***
10 * Content-Type: application/http
11 * Content-Transfer-Encoding: binary
12 *
13 * GET /SomeUrl/API_BUSINESS_PARTNER/A_BusinessPartnerBank?$format=json&$top=1 HTTP/1.1
14 *
15 *
16 * *** example ends ***
17 * @param request - The request builder of the retrieve request.
18 * @returns The request body.
19 */
20function toBatchRetrieveBody(request) {
21 return odata_common_1.serializeRequest(request);
22}
23exports.toBatchRetrieveBody = toBatchRetrieveBody;
24exports.toBatchRetrieveBodyV4 = toBatchRetrieveBody;
25/**
26 * @deprecated Since v1.30.0. Use [[serializeChangeSet]] instead.
27 * Serialize change set to string.
28 * @param changeSet - Change set containing a collection of write operations.
29 * @returns The serialized string representation of a change set.
30 */
31function toBatchChangeSet(changeSet) {
32 return odata_common_1.serializeChangeSet(changeSet);
33}
34exports.toBatchChangeSet = toBatchChangeSet;
35exports.toBatchChangeSetV4 = toBatchChangeSet;
36//# sourceMappingURL=batch-request-serializer.js.map
\No newline at end of file