@Override
    public boolean send(final String from, final String to, final String message) {
        HttpResponse response = null;
        try {
            val parameters = new HashMap<String, String>();
            val holder = ClientInfoHolder.getClientInfo();
            if (holder != null) {
                parameters.put("clientIpAddress", holder.getClientIpAddress());
                parameters.put("serverIpAddress", holder.getServerIpAddress());
            }
            parameters.put("from", from);
            parameters.put("to", to);

            val headers = CollectionUtils.<String, String>wrap(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
            headers.putAll(restProperties.getHeaders());

            var exec = HttpExecutionRequest.builder()
                .basicAuthPassword(restProperties.getBasicAuthPassword())
                .basicAuthUsername(restProperties.getBasicAuthUsername())
                .method(HttpMethod.valueOf(restProperties.getMethod().toUpperCase(Locale.ENGLISH)))
                .url(restProperties.getUrl())
                .httpClient(this.httpClient)
                .headers(headers);

            exec = switch (restProperties.getStyle()) {
                case QUERY_PARAMETERS -> exec.parameters(parameters).entity(message);
                case REQUEST_BODY -> {
                    parameters.put("text", message);
                    val body = FunctionUtils.doUnchecked(() -> MAPPER.writeValueAsString(parameters));
                    yield exec.entity(body);
                }
            };
            response = HttpUtils.execute(exec.build());
            return response != null && HttpStatus.valueOf(response.getCode()).is2xxSuccessful();
        } finally {
            HttpUtils.close(response);
        }
    }
This is {@link RestfulSmsSender}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-notifications-api/src/main/java/org/apereo/cas/notifications/sms/RestfulSmsSender.java