Basic Commands for HTTP using CircuitBreaker with Resilience4j
- BaseHttpGetResilience4jCommand
- BaseHttpPostResilience4jCommand
- BaseHttpPutResilience4jCommand
- BaseHttpDeleteResilience4jCommand
- BaseResilience4jCommand
CommandProxy commandProxy = new CommandProxy();
URI baseUri = URI.create("https://example.com/");
BaseResilience4jCommand command = new BaseHttpGetResilience4jCommand(baseUri, "name-of-similar-commands");
HttpResponse<String> response = commandProxy.run(command);
int status = response.statusCode();
String body = response.body();