public class RequestOptions extends Object
| Constructor and Description |
|---|
RequestOptions() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
CachingStrategy |
getCachingStrategy() |
com.google.gson.Gson |
getGson() |
List<org.apache.http.Header> |
getHeaders() |
HttpMethod |
getHttpMethod() |
int |
hashCode() |
RequestOptions |
withCachingStrategy(CachingStrategy cachingStrategy) |
RequestOptions |
withGson(com.google.gson.Gson gson)
Sets the
Gson instance that will be used to deserialise the JSON response. |
RequestOptions |
withHeaders(List<org.apache.http.Header> headers)
Permits to define HTTP headers that will be sent with the GraphQL request.
|
RequestOptions |
withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method used to send the request, only GET or POST are supported.
|
public RequestOptions withGson(com.google.gson.Gson gson)
Gson instance that will be used to deserialise the JSON response. This should only be used when the JSON
response cannot be deserialised by a standard Gson instance, or when some custom deserialisation is needed.gson - A custom Gson instance.public RequestOptions withHeaders(List<org.apache.http.Header> headers)
BasicHeader for an implementation of the Header interface.headers - The HTTP headers.public RequestOptions withHttpMethod(HttpMethod httpMethod)
httpMethod - The HTTP method.public RequestOptions withCachingStrategy(CachingStrategy cachingStrategy)
public com.google.gson.Gson getGson()
public List<org.apache.http.Header> getHeaders()
public HttpMethod getHttpMethod()
public CachingStrategy getCachingStrategy()
Copyright © 2021 Adobe. All rights reserved.