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 String
header(String name)
String
method()
String
path()
default String
remoteIp()
default int
remotePort()
default String
route()
Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".String
url()
-
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
null
if 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.null
indicates this instrumentation doesn't understand http routes.- Returns:
- HTTP route or
null
if not set.
-
url
@Nullable String url()
- Returns:
- HTTP URL or
null
if not set.
-
header
@Nullable String header(String name)
- Parameters:
name
- header name- Returns:
- HTTP header or
null
if not set.
-
remoteIp
default String remoteIp()
- Returns:
- remote IP for the given connection.
-
remotePort
default int remotePort()
- Returns:
- remote port for the given connection.
-
-