Class HttpForward


public class HttpForward extends Action<HttpForward>
Author:
jamesdbloom
  • Constructor Details

    • HttpForward

      public HttpForward()
  • Method Details

    • forward

      public static HttpForward forward()
      Static builder to create a forward.
    • getType

      public Action.Type getType()
      Specified by:
      getType in class Action<HttpForward>
    • getHost

      public String getHost()
    • withHost

      public HttpForward withHost(String host)
      The host or ip address to forward the request to i.e. "www.mock-server.com"
      Parameters:
      host - a hostname or ip address as a string
    • getPort

      public Integer getPort()
    • withPort

      public HttpForward withPort(Integer port)
      The port to forward the request to i.e. 80. If not specified the port defaults to 80.
      Parameters:
      port - a port as an integer
    • getScheme

      public HttpForward.Scheme getScheme()
    • withScheme

      public HttpForward withScheme(HttpForward.Scheme scheme)
      The scheme to use when forwarded the request, either HTTP or HTTPS. If not specified the scheme defaults to HTTP.
      Parameters:
      scheme - the scheme as a HttpForward.Scheme value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Action<HttpForward>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Action<HttpForward>