io.vertx.core.http

## Class RequestOptions

- java.lang.Object
- - io.vertx.core.http.RequestOptions

-     public class RequestOptions
      extends Object

  Options describing how an `HttpClient` will make connect to make a request.
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_HOST` The default value for host name = "localhost"
    `static int` | `DEFAULT_PORT` The default value for port = 80
    `static boolean` | `DEFAULT_SSL` SSL enabled by default = false
    `static String` | `DEFAULT_URI` The default relative request URI = ""

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestOptions()` Default constructor
    `RequestOptions(JsonObject json)` Create options from JSON
    `RequestOptions(RequestOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getHost()` Get the host name to be used by the client request.
    `int` | `getPort()` Get the port to be used by the client request.
    `String` | `getURI()`
    `boolean` | `isSsl()`
    `RequestOptions` | `setHost(String host)` Set the host name to be used by the client request.
    `RequestOptions` | `setPort(int port)` Set the port to be used by the client request.
    `RequestOptions` | `setSsl(boolean ssl)` Set whether SSL/TLS is enabled
    `RequestOptions` | `setURI(String uri)` Set the request relative URI

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_HOST

          public static final String DEFAULT_HOST

      The default value for host name = "localhost"
      See Also:
        Constant Field Values

    - #### DEFAULT_PORT

          public static final int DEFAULT_PORT

      The default value for port = 80
      See Also:
        Constant Field Values

    - #### DEFAULT_SSL

          public static final boolean DEFAULT_SSL

      SSL enabled by default = false
      See Also:
        Constant Field Values

    - #### DEFAULT_URI

          public static final String DEFAULT_URI

      The default relative request URI = ""
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RequestOptions

          public RequestOptions()

      Default constructor

    - #### RequestOptions

          public RequestOptions(RequestOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### RequestOptions

          public RequestOptions(JsonObject json)

      Create options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getHost

          public String getHost()

      Get the host name to be used by the client request.
      Returns:
        the host name

    - #### setHost

          public RequestOptions setHost(String host)

      Set the host name to be used by the client request.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPort

          public int getPort()

      Get the port to be used by the client request.
      Returns:
        the port

    - #### setPort

          public RequestOptions setPort(int port)

      Set the port to be used by the client request.
      Returns:
        a reference to this, so the API can be used fluently

    - #### isSsl

          public boolean isSsl()

      Returns:
        is SSL/TLS enabled?

    - #### setSsl

          public RequestOptions setSsl(boolean ssl)

      Set whether SSL/TLS is enabled
      Parameters:
        `ssl` - true if enabled
      Returns:
        a reference to this, so the API can be used fluently

    - #### getURI

          public String getURI()

      Returns:
        the request relative URI

    - #### setURI

          public RequestOptions setURI(String uri)

      Set the request relative URI
      Parameters:
        `uri` - the relative uri
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2018 Eclipse. All rights reserved.