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:
- 3.0.0
- Author:
- OpenZipkin Brave Authors, Marcin Grzejszczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
header(String header)
default String
method()
default HttpRequest
request()
default String
route()
Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".int
statusCode()
-
Methods inherited from interface org.springframework.cloud.sleuth.http.Response
error, headerNames, spanKind, unwrap
-
-
-
-
Method Detail
-
request
@Nullable default HttpRequest request()
-
method
@Nullable default String method()
- Returns:
- 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:
- HTTP route or
null
if not set.
-
statusCode
int statusCode()
- Returns:
- The HTTP status code or zero if unreadable.
-
-