All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.femo.http.transport.HttpsTransport Maven / Gradle / Ivy

Go to download

An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request. On android only asynchronous driver is supported. This library has been backported to jdk 7 to retain compatibility with android!

The newest version!
package io.femo.http.transport;

import io.femo.http.Transport;

import javax.net.SocketFactory;
import javax.net.ssl.SSLSocketFactory;
import java.io.IOException;
import java.net.Socket;

/**
 * Created by felix on 2/7/16.
 */
public class HttpsTransport implements Transport {

    private static SocketFactory sslSocketFactory;

    @Override
    public Socket openSocket(String host, int port) throws IOException {
        return sslSocketFactory.createSocket(host, port);
    }

    static {
        sslSocketFactory = SSLSocketFactory.getDefault();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy