Interface HttpResponse

All Superinterfaces:
Response
All Known Subinterfaces:
HttpClientResponse, HttpServerResponse

public interface HttpResponse extends Response
This API is taken from OpenZipkin Brave.

Abstract response type used for parsing and sampling. Represents an HTTP response.

Since:
1.10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    header(String header)
    Returns the header value.
    default String
    Returns an HTTP method.
    default HttpRequest
    Returns the HTTP request.
    default String
    Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".
    int
    Returns the HTTP status code.

    Methods inherited from interface io.micrometer.tracing.http.Response

    error, headerNames, kind, unwrap
  • Method Details

    • request

      @Nullable default HttpRequest request()
      Description copied from interface: Response
      Returns the HTTP request.
      Specified by:
      request in interface Response
      Returns:
      corresponding request
    • method

      @Nullable default String method()
      Returns an HTTP method.
      Returns:
      an HTTP method
    • 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:
      an HTTP route or null if not set
    • statusCode

      int statusCode()
      Returns the HTTP status code.
      Returns:
      an HTTP status code or zero if unreadable
    • header

      default String header(String header)
      Returns the header value.
      Parameters:
      header - header name
      Returns:
      an HTTP header or null if not set.