Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private final RestTemplate restTemplate;
- Future<Boolean> result = executorService.submit(() -> {
- String request = smsAeroUri + "?user="
- + smsAeroLogin + "&password="
- + smsAeroPassword + "&to="
- + form.getPhone()
- + "&text=" + "Abacus. Ваш логин: "
- + login + " Пароль: " + password
- + "&from="
- + smsAeroFrom + "&type="
- + smsAeroType;
- ResponseEntity<String> responseEntity = restTemplate.getForEntity(request, String.class);
- if (responseEntity.getBody().contains("accepted")) {
- return true;
- } else {
- throw new IllegalArgumentException("Проблемы с номером телефона");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement