Interface HttpInfos

All Known Subinterfaces:
HttpClientInfos, HttpClientRequest, HttpClientResponse, HttpServerInfos, HttpServerRequest, HttpServerResponse
All Known Implementing Classes:
HttpOperations

public interface HttpInfos
An Http Reactive Channel with several accessors related to HTTP flow: headers, params, URI, method, websocket...
Since:
0.5
Author:
Stephane Maldini
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns resolved HTTP cookies.
    Returns the decoded path portion from the uri().
    boolean
    Is the request keep alive.
    boolean
    Returns true if websocket connection (upgraded).
    Returns the resolved request method (HTTP 1.1 etc.).
    default String
    Returns the decoded path portion from the uri() without the leading and trailing '/' if present.
    Return a unique id for the request.
    uri()
    Returns the resolved target address.
    Returns the resolved request version (HTTP 1.1 etc).
  • Method Details

    • cookies

      Map<CharSequence,Set<Cookie>> cookies()
      Returns resolved HTTP cookies.
      Returns:
      Resolved HTTP cookies
    • fullPath

      String fullPath()
      Returns the decoded path portion from the uri().
      Returns:
      the decoded path portion from the uri()
      Throws:
      IllegalArgumentException - if the uri() violates RFC2396
      Since:
      0.9.6
    • requestId

      String requestId()
      Return a unique id for the request. The id is a combination of the id of the underlying connection and the serial number of the request received on that connection.

      Format of the id: <CONNECTION_ID>-<REQUEST_NUMBER>

      Example: <CONNECTION_ID>: 329c6ffd <REQUEST_NUMBER>: 5 Result: 329c6ffd-5

      Returns:
      an unique id for the request
      Since:
      1.0.5
    • isKeepAlive

      boolean isKeepAlive()
      Is the request keep alive.
      Returns:
      is keep alive
    • isWebsocket

      boolean isWebsocket()
      Returns true if websocket connection (upgraded).
      Returns:
      true if websocket connection
    • method

      HttpMethod method()
      Returns the resolved request method (HTTP 1.1 etc.).
      Returns:
      the resolved request method (HTTP 1.1 etc.)
    • path

      default String path()
      Returns the decoded path portion from the uri() without the leading and trailing '/' if present.
      Returns:
      the decoded path portion from the uri() without the leading and trailing '/' if present
      Throws:
      IllegalArgumentException - if the uri() violates RFC2396
    • uri

      String uri()
      Returns the resolved target address.
      Returns:
      the resolved target address
    • version

      HttpVersion version()
      Returns the resolved request version (HTTP 1.1 etc).
      Returns:
      the resolved request version (HTTP 1.1 etc)