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> Single<T>
emptyResponse
(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, ResponseBuilder<?, T, ?> responseBuilder) Empty response, may be because of aHttp.Status.NOT_FOUND_404
, or some other status, such asHttp.Status.NOT_MODIFIED_304
.protected Throwable
readError
(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, JsonObject entity) Read error with a JSON entity.Methods inherited from class io.helidon.integrations.common.rest.RestApiBase
addHeaders, addQueryParams, errorResponse, ftHandler, handleBytesResponse, handleJsonResponse, handleOptionalJsonResponse, handlePublisherResponse, handleResponse, invoke, invokeBytesRequest, invokeBytesResponse, invokeOptional, invokePublisherResponse, invokeWithResponse, isEntityExpected, isSuccess, jsonBuilderFactory, jsonOkResponse, jsonReaderFactory, jsonWriterFactory, noEntityOkResponse, readError, readError, readErrorFailedEntity, requestBytesPayload, requestId, requestJsonPayload, requestPayload, responseSupplier, updateRequestBuilder, updateRequestBuilder, updateRequestBuilderBytesPayload, updateRequestBuilderCommon, webClient
-
Constructor Details
-
VaultRestApi
-
-
Method Details
-
builder
A new builder.- Returns:
- a new builder
-
emptyResponse
protected <T> Single<T> emptyResponse(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse response, ResponseBuilder<?, T, ?> responseBuilder) Description copied from class:RestApiBase
Empty response, may be because of aHttp.Status.NOT_FOUND_404
, or some other status, such asHttp.Status.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 Throwable readError(String path, ApiRequest<?> request, Http.RequestMethod method, String requestId, WebClientResponse 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:
- a throwable to be used in response
-