Class Vertx5HttpResponse
- java.lang.Object
-
- io.fabric8.kubernetes.client.http.StandardHttpHeaders
-
- io.fabric8.kubernetes.client.vertx5.Vertx5HttpResponse
-
- All Implemented Interfaces:
HttpHeaders,HttpResponse<AsyncBody>
public class Vertx5HttpResponse extends StandardHttpHeaders implements HttpResponse<AsyncBody>
Vert.x 5 implementation ofHttpResponsefor the Fabric8 Kubernetes Client.Bridges Vert.x 5's
HttpClientResponsewith Fabric8's HTTP abstraction, providing case-insensitive headers and async body streaming for Kubernetes operations like pod logs, exec sessions, and watch operations.Thread-safe and immutable once constructed. The
AsyncBodymust be consumed or cancelled to prevent resource leaks.- Since:
- 7.6.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.http.HttpResponse
HttpResponse.SupportedResponses
-
-
Field Summary
-
Fields inherited from class io.fabric8.kubernetes.client.http.StandardHttpHeaders
CONTENT_LENGTH, CONTENT_TYPE, EXPECT, EXPECT_CONTINUE, PROXY_AUTHORIZATION, RETRY_AFTER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncBodybody()Returns the async response body for streaming consumption.intcode()Returns the HTTP status code from the underlying Vert.x response.Optional<HttpResponse<?>>previousResponse()Returns the previous response in an HTTP redirect chain.HttpRequestrequest()Returns the original HTTP request that initiated this response.-
Methods inherited from class io.fabric8.kubernetes.client.http.StandardHttpHeaders
headers, headers
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.http.HttpHeaders
header, headers, headers
-
Methods inherited from interface io.fabric8.kubernetes.client.http.HttpResponse
bodyString, isSuccessful, message
-
-
-
-
Method Detail
-
code
public int code()
Returns the HTTP status code from the underlying Vert.x response.- Specified by:
codein interfaceHttpResponse<AsyncBody>- Returns:
- the HTTP status code (e.g., 200, 404, 500)
-
body
public AsyncBody body()
Returns the async response body for streaming consumption.Provides non-blocking access with backpressure support, ideal for streaming Kubernetes operations like pod logs, exec sessions, and watch operations. The body must be consumed or cancelled to prevent resource leaks.
- Specified by:
bodyin interfaceHttpResponse<AsyncBody>- Returns:
- the async body for streaming data consumption
-
request
public HttpRequest request()
Returns the original HTTP request that initiated this response. Useful for debugging, correlation, and retry logic.- Specified by:
requestin interfaceHttpResponse<AsyncBody>- Returns:
- the original HTTP request
-
previousResponse
public Optional<HttpResponse<?>> previousResponse()
Returns the previous response in an HTTP redirect chain.Currently always returns empty as redirect chain tracking is not implemented. Redirects are rare in Kubernetes API contexts.
- Specified by:
previousResponsein interfaceHttpResponse<AsyncBody>- Returns:
- empty Optional
-
-