99
1010public class InstasentClient {
1111
12- private String rootEndpoint = "http://api.instasent.codes" ;
13- private String secureChannel = "http://api.instasent.codes" ;
12+ private String secureChannel = "https://api.instasent.codes" ;
1413 private String token ;
15- private boolean userSecureChannel = true ;
1614
17- public InstasentClient (String token , boolean useSecureChannel ) {
15+ public InstasentClient (String token ) {
1816 this .token = token ;
19- this .userSecureChannel = useSecureChannel ;
2017 }
2118
2219 public Map <String , String > sendSms (String from , String to , String text ) {
2320 String url ;
2421
25- if (this .userSecureChannel )
26- url = this .secureChannel + "/sms/" ;
27- else
28- url = this .rootEndpoint + "/sms/" ;
22+ url = this .secureChannel + "/sms/" ;
2923
3024 String httpMethod = "POST" ;
3125
@@ -41,10 +35,7 @@ public Map<String, String> getSms(int page, int per_page) {
4135
4236 String url ;
4337
44- if (this .userSecureChannel )
45- url = this .secureChannel + "/sms/?" + "page=" + page + "&per_page=" + per_page ;
46- else
47- url = this .rootEndpoint + "/sms/?" + "page=" + page + "&per_page=" + per_page ;
38+ url = this .secureChannel + "/sms/?" + "page=" + page + "&per_page=" + per_page ;
4839
4940 String httpMethod = "GET" ;
5041
@@ -57,10 +48,7 @@ public Map<String, String> getSmsById(String id) {
5748
5849 String url ;
5950
60- if (this .userSecureChannel )
61- url = this .secureChannel + "/sms/" + id ;
62- else
63- url = this .rootEndpoint + "/sms/" + id ;
51+ url = this .secureChannel + "/sms/" + id ;
6452
6553 String httpMethod = "GET" ;
6654
0 commit comments