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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Stringheader(String name)Stringmethod()Stringpath()default StringremoteIp()default intremotePort()default Stringroute()Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".Stringurl()-
Methods inherited from interface org.springframework.cloud.sleuth.http.Request
headerNames, spanKind, unwrap
-
-
-
-
Method Detail
-
method
String method()
- Returns:
- HTTP method.
-
path
@Nullable String path()
- Returns:
- HTTP path or
nullif 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.nullindicates this instrumentation doesn't understand http routes.- Returns:
- HTTP route or
nullif not set.
-
url
@Nullable String url()
- Returns:
- HTTP URL or
nullif not set.
-
header
@Nullable String header(String name)
- Parameters:
name- header name- Returns:
- HTTP header or
nullif not set.
-
remoteIp
default String remoteIp()
- Returns:
- remote IP for the given connection.
-
remotePort
default int remotePort()
- Returns:
- remote port for the given connection.
-
-