title: How to make Android can access HTTPS request?
body: <p>Hello every professional,</p>
  
  <p>I'm a new in Android development, recently, I just get into Android area, now I encountered a problem when I tried to access server application with HTTPS request (Like <a href="https://DEVELOPMENT_SAMPLE.com/project" rel="nofollow">https://DEVELOPMENT_SAMPLE.com/project</a>), we use <code>Spring for Android</code> to handle request, and use <code>Apache</code>HTTP Server + Tomcat + SSL` as a deployment environment. When I use HTTP request instead of HTTPS request and remove SSL from the deployement environment, the access can be successfully handled. I share the related code from here:</p>
  
  <pre><code>    RestTemplate restTemplate = new RestTemplate();
      restTemplate.getMessageConverters().add(new GsonHttpMessageConverter());
      restTemplate.getMessageConverters().add(new StringHttpMessageConverter());
  
      HttpComponentsClientHttpRequestFactory factory = new
  HttpComponentsClientHttpRequestFactory();
      factory.setConnectTimeout(1000 * 15);
      restTemplate.setRequestFactory(factory);
  </code></pre>
  
  <p>I know There are two native HTTP clients available on Android, the standard J2SE facilities, and the HttpComponents HttpClient. The standard JS2SE facilities are made available through the SimpleClientHttpRequestFactory, while the HttpClient is made available through the HttpComponentsClientHttpRequestFactory. The default ClientHttpRequestFactory used when you create a new RestTemplate instance differs based on the version of Android on which your application is running.</p>
  
  <p>But the question I want to ask is how to make my HTTPS is available for Android client? I guess some change should be made in getting Connection object.</p>
  
  <p>Thanks so much.</p>