BatchRequest Class

public class BatchRequest
extends BaseRequest<BatchResponseContent>

Request for batch requests

Constructor Summary

Constructor Description
BatchRequest(String requestUrl, IBaseClient<?> client, List<? extends Option> options)

Instantiates a new batch request

Method Summary

Modifier and Type Method and Description
BatchResponseContent post(BatchRequestContent content)

Send this request

java.util.concurrent.CompletableFuture<BatchResponseContent> postAsync(BatchRequestContent content)

Send this request

Methods inherited from BaseRequest

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

BatchRequest

public BatchRequest(String requestUrl, IBaseClient client, List options)

Instantiates a new batch request

Parameters:

requestUrl - the URL to send the request to
client - the client to use to execute the request
options - the options to apply to the request

Method Details

post

public BatchResponseContent post(BatchRequestContent content)

Send this request

Parameters:

content - content of the batch request to execute

Returns:

the response object

Throws:

ClientException - an exception occurs if there was an error while the request was sent

postAsync

public CompletableFuture postAsync(BatchRequestContent content)

Send this request

Parameters:

content - content of the batch request to execute

Returns:

the response object

Throws:

ClientException - an exception occurs if there was an error while the request was sent

Applies to