Interface HttpRequest

  • All Superinterfaces:
    Request
    All Known Subinterfaces:
    HttpClientRequest, HttpServerRequest

    public interface HttpRequest
    extends Request
    This API is taken from OpenZipkin Brave. Abstract request type used for parsing and sampling. Represents an HTTP request.
    Since:
    3.0.0
    Author:
    OpenZipkin Brave Authors, Marcin Grzejszczak
    • Method Detail

      • method

        String method()
        Returns:
        HTTP method.
      • path

        @Nullable
        String path()
        Returns:
        HTTP path or null if not set.
      • route

        @Nullable
        default String route()
        Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route". If no route matched, "" (empty string) is returned. null indicates this instrumentation doesn't understand http routes.
        Returns:
        HTTP route or null if not set.
      • url

        @Nullable
        String url()
        Returns:
        HTTP URL or null if not set.
      • header

        @Nullable
        String header​(String name)
        Parameters:
        name - header name
        Returns:
        HTTP header or null if not set.
      • remoteIp

        default String remoteIp()
        Returns:
        remote IP for the given connection.
      • remotePort

        default int remotePort()
        Returns:
        remote port for the given connection.