Class WebClientProtocolResponse
java.lang.Object
io.helidon.webclient.api.WebClientProtocolResponse
Protocol-neutral context for a response received by a WebClient transport.
-
Method Summary
Modifier and TypeMethodDescriptionAlternative authority used for this request, if any.static WebClientProtocolResponsecreate(ResolvedClientTarget target, boolean explicitConnection, String protocolId, Status status, ClientResponseHeaders headers, Instant receivedAt) Create response context for a request sent to its direct route.static WebClientProtocolResponsecreateAlternative(ResolvedClientTarget target, boolean explicitConnection, String protocolId, Status status, ClientResponseHeaders headers, Instant receivedAt, UriAuthority alternativeAuthority) Create response context for a request sent to an alternative service.booleanWhether the request used a caller-supplied or otherwise out-of-band connection.headers()Full immutable snapshot of response headers.Actual protocol selected for this response.Time the response headers were received.booleansecure()Whether this response used TLS for an HTTPS target.status()Response status.target()Exact resolved target used for this response.
-
Method Details
-
create
public static WebClientProtocolResponse create(ResolvedClientTarget target, boolean explicitConnection, String protocolId, Status status, ClientResponseHeaders headers, Instant receivedAt) Create response context for a request sent to its direct route.- Parameters:
target- resolved physical and logical targetexplicitConnection- whether the request used a caller-supplied or otherwise out-of-band connectionprotocolId- actual response protocol identifierstatus- response statusheaders- response headersreceivedAt- time the response headers were received- Returns:
- response context
-
createAlternative
public static WebClientProtocolResponse createAlternative(ResolvedClientTarget target, boolean explicitConnection, String protocolId, Status status, ClientResponseHeaders headers, Instant receivedAt, UriAuthority alternativeAuthority) Create response context for a request sent to an alternative service.- Parameters:
target- resolved physical and logical targetexplicitConnection- whether the request used a caller-supplied or otherwise out-of-band connectionprotocolId- actual response protocol identifierstatus- response statusheaders- response headersreceivedAt- time the response headers were receivedalternativeAuthority- alternative authority used for the request- Returns:
- response context
-
target
Exact resolved target used for this response.- Returns:
- resolved target
-
explicitConnection
public boolean explicitConnection()Whether the request used a caller-supplied or otherwise out-of-band connection.- Returns:
- whether the request used an explicit connection
-
protocolId
-
status
-
headers
Full immutable snapshot of response headers.- Returns:
- response headers
-
secure
public boolean secure()Whether this response used TLS for an HTTPS target.- Returns:
- whether the response is secure
-
receivedAt
-
alternativeAuthority
Alternative authority used for this request, if any.- Returns:
- alternative authority
-