Sending SMS from CUBA Application

I want to send SMS from my CUBA application. I see two options are viable i.e. Use of SMS API or using GSM mobile operator service. for the option #2, I have received the following URL info from
my mobile company that is required to be called from my CUBA application.

String requestUrl ="

when I run the above URL in a browser, sms works.

I have converted the above hard coded SMS into variables and passed the value of the variables from an Entity to the URL. How do I run the URL (here requestURL) from CUBA application to send the SMS?


You can use thirdparty Java libraries to send HTTP requests, for instance, apache-httpclient (already added to CUBA dependencies):

Also, I’d recommend that you try to use retrofit2 Retrofit or Unirest: , they are simpler than Apache HttpClient and have fluent APIs

Hi Yuriy
Thanks. Will this be enough to call as follows?

   String requestUrl ="

HttpClient client = HttpClientBuilder.create().build();
HttpGet request = new HttpGet(requestUrl);
HttpResponse response = client.execute(request);