Class RequestOptions.Builder

    • Method Detail

      • addHeader

        public void addHeader​(java.lang.String name,
                              java.lang.String value)
        Add the provided header to the request.
      • setHttpAsyncResponseConsumerFactory

        public void setHttpAsyncResponseConsumerFactory​(HttpAsyncResponseConsumerFactory httpAsyncResponseConsumerFactory)
        Set the HttpAsyncResponseConsumerFactory used to create one HttpAsyncResponseConsumer callback per retry. Controls how the response body gets streamed from a non-blocking HTTP connection on the client side.
      • setWarningsHandler

        public void setWarningsHandler​(WarningsHandler warningsHandler)
        How this request should handle warnings. If null (the default) then this request will default to the behavior dictacted by RestClientBuilder.setStrictDeprecationMode(boolean).

        This can be set to WarningsHandler.PERMISSIVE if the client should ignore all warnings which is the same behavior as setting strictDeprecationMode to true. It can be set to WarningsHandler.STRICT if 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.