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 Stringheader(String header)default Stringmethod()default HttpRequestrequest()default Stringroute()Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".intstatusCode()-
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.nullindicates this instrumentation doesn't understand http routes.- Returns:
- HTTP route or
nullif not set.
-
statusCode
int statusCode()
- Returns:
- The HTTP status code or zero if unreadable.
-
-