Class List Method List File List

# Class: VertxWebClient::HttpResponseBuilder

Inherits:
  Object
  - Object
  - VertxWebClient::HttpResponseBuilder
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/http_response_builder.rb

## Overview

A builder for configuring client-side HTTP responses.

## Class Method Summary (collapse)

- + (::VertxWebClient::HttpResponseBuilder) buffer
- + (::VertxWebClient::HttpResponseBuilder) json_object
- + (::VertxWebClient::HttpResponseBuilder) string(enc = nil)

## Class Method Details

### + (`::VertxWebClient::HttpResponseBuilder`) buffer

Returns:

- (`::VertxWebClient::HttpResponseBuilder`)

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/http_response_builder.rb', line 29

    def self.buffer
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::HttpResponseBuilder.java_method(:create, []).call(), ::VertxWebClient::HttpResponseBuilder, ::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling buffer()"
    end

### + (`::VertxWebClient::HttpResponseBuilder`) json_object

Returns:

- (`::VertxWebClient::HttpResponseBuilder`)

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/http_response_builder.rb', line 36

    def self.json_object
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::HttpResponseBuilder.java_method(:jsonObject, []).call(),::VertxWebClient::HttpResponseBuilder, nil)
      end
      raise ArgumentError, "Invalid arguments when calling json_object()"
    end

### + (`::VertxWebClient::HttpResponseBuilder`) string(enc = nil)

Parameters:

- enc (`String`) (defaults to: `nil`)

Returns:

- (`::VertxWebClient::HttpResponseBuilder`)

Raises:

- (`ArgumentError`)

    20
    21
    22
    23
    24
    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/http_response_builder.rb', line 20

    def self.string(enc=nil)
      if !block_given? && enc == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::HttpResponseBuilder.java_method(:string, []).call(),::VertxWebClient::HttpResponseBuilder, nil)
      elsif enc.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::HttpResponseBuilder.java_method(:string, [Java::java.lang.String.java_class]).call(enc),::VertxWebClient::HttpResponseBuilder, nil)
      end
      raise ArgumentError, "Invalid arguments when calling string(#{enc})"
    end