Package com.microsoft.graph.content
Class BatchRequest
- All Implemented Interfaces:
IHttpRequest
Request for batch requests
-
Field Summary
Fields inherited from class com.microsoft.graph.http.BaseRequest
functionOptions, queryOptions, REQUEST_STATS_HEADER_VALUE_FORMAT_STRING -
Constructor Summary
ConstructorsConstructorDescriptionBatchRequest(String requestUrl, IBaseClient<?> client, List<? extends Option> options) Instantiates a new batch request -
Method Summary
Modifier and TypeMethodDescriptionpost(BatchRequestContent content) Send this requestpostAsync(BatchRequestContent content) Send this requestMethods inherited from class com.microsoft.graph.http.BaseRequest
addCountOption, addExpandOption, addFilterOption, addFunctionOption, addHeader, addOrderByOption, addQueryOption, addSelectOption, addSkipOption, addSkipTokenOption, addTopOption, getClient, getDelay, getFunctionOptions, getHeaders, getHttpMethod, getHttpRequest, getMaxRedirects, getMaxRetries, getOptions, getQueryOptions, getRequestUrl, getResponseType, getShouldRedirect, getShouldRetry, getUseCaches, send, sendAsync, setDelay, setHttpMethod, setMaxRedirects, setMaxRetries, setShouldRedirect, setShouldRetry, setUseCaches, withHttpMethodMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.microsoft.graph.http.IHttpRequest
getHttpRequest
-
Constructor Details
-
BatchRequest
public BatchRequest(@Nonnull String requestUrl, @Nonnull IBaseClient<?> client, @Nonnull List<? extends Option> options) Instantiates a new batch request- Parameters:
requestUrl- the URL to send the request toclient- the client to use to execute the requestoptions- the options to apply to the request
-
-
Method Details
-
post
@Nullable public BatchResponseContent post(@Nullable BatchRequestContent content) throws ClientException 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
@Nullable public CompletableFuture<BatchResponseContent> postAsync(@Nullable BatchRequestContent content) throws ClientException 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
-