forked from microsoftgraph/msgraph-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomRequestBuilder.java
More file actions
30 lines (24 loc) · 1022 Bytes
/
Copy pathCustomRequestBuilder.java
File metadata and controls
30 lines (24 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.microsoft.graph.requests.extensions;
import java.util.List;
import com.microsoft.graph.core.IBaseClient;
import com.microsoft.graph.http.BaseRequestBuilder;
import com.microsoft.graph.http.CustomRequest;
import com.microsoft.graph.options.Option;
/**
* The class for the CustomRequestBuilder
*
* If the provided URL is malformed, the ClientException will contain a MalformedURLException
*/
public class CustomRequestBuilder<T> extends BaseRequestBuilder {
public final Class<T> responseType;
public CustomRequestBuilder(final String requestUrl, final IBaseClient client, final List<? extends Option> requestOptions, final Class<T> responseType) {
super(requestUrl, client, requestOptions);
this.responseType = responseType;
}
public CustomRequest<T> buildRequest() {
return buildRequest(getOptions());
}
public CustomRequest<T> buildRequest(final List<? extends Option> requestOptions) {
return new CustomRequest<T>(getRequestUrl(), getClient(), requestOptions, responseType);
}
}