-
<inner> batchParser(handler, text, context)
-
Parses a batch response.
Parameters:
Name |
Type |
Description |
handler |
|
This handler. |
text |
String
|
Batch text. |
context |
Object
|
Object with parsing context. |
- Source:
Returns:
An object representation of the batch.
-
<inner> batchSerializer(handler, data, context)
-
Serializes a batch object representation into text.
Parameters:
Name |
Type |
Description |
handler |
|
This handler. |
data |
Object
|
Representation of a batch. |
context |
Object
|
Object with parsing context. |
- Source:
Returns:
An text representation of the batch object; undefined if not applicable.#
-
<inner> readLine(text, context) → {String}
-
Returns a substring from the position defined by the context up to the next line break (CRLF).
Parameters:
Name |
Type |
Description |
text |
String
|
Input string. |
context |
|
Context used for reading the input string. |
- Source:
Returns:
Substring to the first ocurrence of a line break or null if none can be found.
-
Type
-
String
-
<inner> readTo(text, context, str) → {String}
-
Returns a substring from the position given by the context up to value defined by the str parameter and increments the position in the context.
Parameters:
Name |
Type |
Argument |
Description |
text |
String
|
|
Input string. |
context |
|
|
Context used for reading the input string. |
str |
String
|
<optional>
|
Substring to read up to. |
- Source:
Returns:
Substring to the first ocurrence of str or the end of the input string if str is not specified. Null if the marker is not found.
-
Type
-
String
-
<inner> writeBatch(data, context) → {String}
-
Serializes a batch request object to a string.
Parameters:
Name |
Type |
Description |
data |
|
Batch request object in payload representation format |
context |
|
Context used for the serialization |
- Source:
Returns:
String representing the batch request
-
Type
-
String
-
<inner> writeBatchPart(part, context, nested) → {String}
-
Serializes a part of a batch request to a string. A part can be either a GET request or
a change set grouping several CUD (create, update, delete) requests.
Parameters:
Name |
Type |
Argument |
Description |
part |
|
|
Request or change set object in payload representation format |
context |
|
|
Object containing context information used for the serialization |
nested |
boolean
|
<optional>
|
- |
- Source:
Returns:
String representing the serialized part
A change set is an array of request objects and they cannot be nested inside other change sets.
-
Type
-
String
-
<inner> writeBatchPartDelimiter(boundary, close) → {String}
-
Creates the delimiter that indicates that start or end of an individual request.
Parameters:
Name |
Type |
Description |
boundary |
String
|
Boundary string used to indicate the start of the request |
close |
Boolean
|
Flag indicating that a close delimiter string should be generated |
- Source:
Returns:
Delimiter string
-
Type
-
String