Package io.micrometer.tracing.http
Interface HttpResponse
- All Superinterfaces:
Response
- All Known Subinterfaces:
HttpClientResponse
,HttpServerResponse
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 TypeMethodDescriptiondefault String
Returns the header value.default String
method()
Returns an HTTP method.default HttpRequest
request()
Returns the HTTP request.default String
route()
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
Description copied from interface:Response
Returns the HTTP request. -
method
Returns an HTTP method.- Returns:
- an HTTP method
-
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
Returns the header value.- Parameters:
header
- header name- Returns:
- an HTTP header or
null
if not set.
-