Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft of a functional VaultClient #51

Closed
wants to merge 2 commits into from
Closed

Draft of a functional VaultClient #51

wants to merge 2 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Feb 1, 2017

Do not merge.

Rename VaultClient to PreviousVaultClient. Introduce VaultClient and VaultClientRequest interfaces. Add default implementations with DefaultVaultClient and DefaultVaultClientRequest. Introduce VaultRequestBody as body provider.

Usage:

VaultResponseEntity<String> response = vaultClient.get()
				.uri("/{hello}/{world}", "hello", "world")
				.header("X-Vault-Token", "…")
				.exchange(String.class);

VaultResponseEntity<Void> response = vaultClient.get()
				.uri("/{hello}/{world}", "hello", "world")
				.header("X-Vault-Token", "…")
				.body(VaultRequestBody.just("{ \"ok\": 1}"))
				.exchange();

VaultResponseEntity<Void> response = vaultClient.get()
				.uri("/example")
				.exchange();

VaultClient defines a builder-style API to build requests with exposing only contextual API for the current build step

Prepare issue branch.
Rename VaultClient to PreviousVaultClient. Introduce VaultClient and VaultClientRequest interfaces. Add default implementations with DefaultVaultClient and DefaultVaultClientRequest. Introduce VaultRequestBody as body provider.
@mp911de
Copy link
Member Author

mp911de commented Feb 1, 2017

See also #49.

@mp911de mp911de closed this Feb 16, 2017
@mp911de
Copy link
Member Author

mp911de commented Feb 16, 2017

Agreed to remove VaultClient entirely.

@mp911de mp911de deleted the issue/49 branch February 16, 2017 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant