new Batch(parameters)
- Source:
- See:
Batch to send using WebApiClient.SendBatch.
Batches can be used for sending multiple requests at once.
All requests inside a change set will be executed as a transaction, i.e. fail or succeed together.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Members
async
- Source:
Properties:
Name | Type | Description |
---|---|---|
async |
bool | False for executing the batch synchronously, defaults to async |
changeSets
- Source:
Properties:
Name | Type | Description |
---|---|---|
changeSets |
Array.<ChangeSet> | Change sets included in this batch. Only non GET requests may be included here. Each change set will execute as a separate transaction |
headers
- Source:
Properties:
Name | Type | Description |
---|---|---|
headers |
Array.<{key:string, value:string}> | Headers for the batch |
isOverLengthGet
- Source:
Properties:
Name | Type | Description |
---|---|---|
isOverLengthGet |
bool | Used internally for flagging a GET request that was originally not a batch but had to be transformed to a batch request automatically since the url was too long |
name
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
String | Name of the batch |
requests
- Source:
Properties:
Name | Type | Description |
---|---|---|
requests |
Array.<Request> | GET Requests included in this batch. GET request may only be included in here |
Methods
buildPayload() → {String}
- Source:
Creates a text representation of the whole batch for sending as message body
This:
- {Batch}
Returns:
- Type
- String