Class PrimitiveRequest<T>

java.lang.Object
com.microsoft.graph.http.BaseRequest<T>
com.microsoft.graph.http.PrimitiveRequest<T>
Type Parameters:
T - the primitive type to deserialize the response to
All Implemented Interfaces:
IHttpRequest

public class PrimitiveRequest<T> extends BaseRequest<T>
The class for the Primitive Request.
  • Constructor Details

    • PrimitiveRequest

      public PrimitiveRequest(@Nonnull String requestUrl, @Nonnull IBaseClient<?> client, @Nullable List<? extends Option> requestOptions, @Nonnull Class<T> primitiveTypeClass)
      The request for the primitive type
      Parameters:
      requestUrl - the request URL
      client - the service client
      requestOptions - the options for this request
      primitiveTypeClass - the return type class for the request
  • Method Details

    • getAsync

      @Nonnull public CompletableFuture<T> getAsync()
      Gets the primitive information from the service
      Returns:
      a future with the result
    • get

      @Nullable public T get() throws ClientException
      Gets the primitive information from the service
      Returns:
      the primitive information from the request
      Throws:
      ClientException - this exception occurs if the request was unable to complete for any reason