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

com.nycjv321.http.Requests Maven / Gradle / Ivy

Go to download

A simple wrapper of Apache's Http Client Library that tries to make interacting with HTTP Easy

The newest version!
package com.nycjv321.http;

/**
 * Created by fedora on 11/18/15.
 */
public class Requests {
    public static class Timeouts {
        private static final Timeouts defaultTimeouts;

        static {
            defaultTimeouts = new Timeouts();
            defaultTimeouts.setConnectionRequestTimeout(10000);
            defaultTimeouts.setConnectTimeout(10000);
            defaultTimeouts.setSocketTimeout(10000);
        }

        private int socketTimeout;
        private int connectTimeout;
        private int connectionRequestTimeout;

        public static Timeouts getDefault() {
            return defaultTimeouts;
        }

        public int getConnectTimeout() {
            return connectTimeout;
        }

        public void setConnectTimeout(int connectTimeout) {
            this.connectTimeout = connectTimeout;
        }

        public int getConnectionRequestTimeout() {
            return connectionRequestTimeout;
        }

        public void setConnectionRequestTimeout(int connectionRequestTimeout) {
            this.connectionRequestTimeout = connectionRequestTimeout;
        }

        public int getSocketTimeout() {
            return socketTimeout;
        }

        public void setSocketTimeout(int socketTimeout) {
            this.socketTimeout = socketTimeout;
        }


    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy