Class VaultRestApi
java.lang.Object
io.helidon.integrations.common.rest.RestApiBase
io.helidon.integrations.vault.auths.common.VaultRestApi
- All Implemented Interfaces:
RestApi
REST API implementation with Vault specific features.
Uses the correct type for exception.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fluent API builder forVaultRestApi
.static class
VaultRestApi.BuilderBase<B extends VaultRestApi.BuilderBase<B>>
A base builder for VaultRestApi subclasses. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic VaultRestApi.Builder
builder()
A new builder.protected <T> T
emptyResponse
(String path, ApiRequest<?> request, Method method, String requestId, HttpClientResponse response, ResponseBuilder<?, T, ?> responseBuilder) Empty response, may be because of aStatus.NOT_FOUND_404
, or some other status, such asStatus.NOT_MODIFIED_304
.protected ApiRestException
readError
(String path, ApiRequest<?> request, Method method, String requestId, HttpClientResponse response, JsonObject entity) Read error with a JSON entity.Methods inherited from class io.helidon.integrations.common.rest.RestApiBase
addHeaders, addQueryParams, ftHandler, handleBytesResponse, handleEntityResponse, handleJsonResponse, handleOptionalJsonResponse, handleResponse, invoke, invokeBytesRequest, invokeBytesResponse, invokeEntityResponse, invokeOptional, invokeWithResponse, isEntityExpected, isSuccess, jsonBuilderFactory, jsonOkResponse, jsonReaderFactory, jsonWriterFactory, noEntityOkResponse, readError, readError, readErrorFailedEntity, requestBytesPayload, requestId, requestJsonPayload, requestPayload, responseError, responseSupplier, updateRequestBuilder, updateRequestBuilder, updateRequestBuilderBytesPayload, updateRequestBuilderCommon, webClient
-
Constructor Details
-
VaultRestApi
-
-
Method Details
-
builder
A new builder.- Returns:
- a new builder
-
emptyResponse
protected <T> T emptyResponse(String path, ApiRequest<?> request, Method method, String requestId, HttpClientResponse response, ResponseBuilder<?, T, ?> responseBuilder) Description copied from class:RestApiBase
Empty response, may be because of aStatus.NOT_FOUND_404
, or some other status, such asStatus.NOT_MODIFIED_304
.- Overrides:
emptyResponse
in classRestApiBase
- Type Parameters:
T
- type of the response- Parameters:
path
- requested pathrequest
- original requestmethod
- HTTP methodrequestId
- ID of the requestresponse
- actual response where we do not expect an entityresponseBuilder
- builder to create a response instance- Returns:
- typed response with no entity
-
readError
protected ApiRestException readError(String path, ApiRequest<?> request, Method method, String requestId, HttpClientResponse response, JsonObject entity) Description copied from class:RestApiBase
Read error with a JSON entity.- Overrides:
readError
in classRestApiBase
- Parameters:
path
- requested pathrequest
- original API requestmethod
- HTTP methodrequestId
- request IDresponse
- web client response with entity consumedentity
- entity as a JSON object- Returns:
- an ApiRestException
-