Skip to content

Instantly share code, notes, and snippets.

Avatar

Fernando Costantini Alfafc

  • https://www.botmaker.com
  • Buenos Aires, Argentina
View GitHub Profile
@Alfafc
Alfafc / App.java
Created Oct 12, 2019
Example to avoid runtime error: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name.java
View App.java
package com.example;
import com.m.arch.utils.NoSNISSLSocketFactory;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import java.io.IOException;
import java.nio.charset.StandardCharsets;