Class RequestOptions
java.lang.Object
org.opensearch.client.RequestOptions
The portion of an HTTP request to OpenSearch that can be
manipulated without changing OpenSearch's behavior.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare two request options for equalityList<org.apache.hc.core5.http.Header> Headers to attach to the request.TheHttpAsyncResponseConsumerFactoryused to create oneAsyncResponseConsumercallback per retry.Query parameters to attach to the request.org.apache.hc.client5.http.config.RequestConfigget RequestConfig, which can set socketTimeout, connectTimeout and so on by requestHow this request should handle warnings.inthashCode()Calculate the hash code of the request optionsCreate a builder that contains these options but can be modified.toString()Convert request options to string representation
-
Field Details
-
DEFAULT
Default request options.
-
-
Method Details
-
toBuilder
Create a builder that contains these options but can be modified. -
getHeaders
Headers to attach to the request. -
getParameters
-
getHttpAsyncResponseConsumerFactory
TheHttpAsyncResponseConsumerFactoryused to create oneAsyncResponseConsumercallback per retry. Controls how the response body gets streamed from a non-blocking HTTP connection on the client side. -
getWarningsHandler
How this request should handle warnings. If null (the default) then this request will default to the behavior dictacted byRestClientBuilder.setStrictDeprecationMode(boolean).This can be set to
WarningsHandler.PERMISSIVEif the client should ignore all warnings which is the same behavior as setting strictDeprecationMode to true. It can be set toWarningsHandler.STRICTif the client should fail if there are any warnings which is the same behavior as settings strictDeprecationMode to false.It can also be set to a custom implementation of WarningsHandler to permit only certain warnings or to fail the request if the warnings returned don't exactly match some set.
-
getRequestConfig
public org.apache.hc.client5.http.config.RequestConfig getRequestConfig()get RequestConfig, which can set socketTimeout, connectTimeout and so on by request- Returns:
- RequestConfig
-
toString
-
equals
-
hashCode
-