Skip to content

Instantly share code, notes, and snippets.

View alfafc's full-sized avatar

Fernando Costantini alfafc

  • https://www.botmaker.com
  • Buenos Aires, Argentina
View GitHub Profile
@alfafc
alfafc / App.java
Created October 12, 2019 00:49
Example to avoid runtime error: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name.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;