// Path: src/main/java/com/mpush/api/Constants.java
// public interface Constants {
//     Charset UTF_8 = Charset.forName("UTF-8");
// 
//     int DEFAULT_SO_TIMEOUT = 1000 * 3;//客户端连接超时时间
// 
//     int DEFAULT_WRITE_TIMEOUT = 1000 * 10;//10s默认packet写超时
// 
//     byte[] EMPTY_BYTES = new byte[0];
// 
//     int DEF_HEARTBEAT = 4 * 60 * 1000;//5min 默认心跳时间
// 
//     int DEF_COMPRESS_LIMIT = 1024;//1k 启用压缩阈值
// 
//     String DEF_OS_NAME = "android";//客户端OS
// 
//     int MAX_RESTART_COUNT = 10;//客户端重连次数超过该值，重连线程休眠10min后再重试
//     int MAX_TOTAL_RESTART_COUNT = 1000;//客户端重连次数超过该值，将不再尝试重连
// 
//     int MAX_HB_TIMEOUT_COUNT = 2;
// 
//     String HTTP_HEAD_READ_TIMEOUT = "readTimeout";
// }


import com.mpush.api.Constants;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import static com.mpush.api.Constants.HTTP_HEAD_READ_TIMEOUT;
    }

    public static HttpRequest buildGet(String uri) {
        return new HttpRequest(HttpMethod.GET, uri);
    }

    public static HttpRequest buildPost(String uri) {
        return new HttpRequest(HttpMethod.POST, uri);
    }

    public static HttpRequest buildPut(String uri) {
        return new HttpRequest(HttpMethod.PUT, uri);
    }

    public static HttpRequest buildDelete(String uri) {
        return new HttpRequest(HttpMethod.DELETE, uri);
    }

    public static HttpRequest build(byte method, String uri) {
        return new HttpRequest(method, uri);
    }

    public byte getMethod() {
        return method;
    }

    public String getUri() {
        return uri;
    }

// Path: src/main/java/com/mpush/api/Constants.java
// public interface Constants {
//     Charset UTF_8 = Charset.forName("UTF-8");
// 
//     int DEFAULT_SO_TIMEOUT = 1000 * 3;//客户端连接超时时间
// 
//     int DEFAULT_WRITE_TIMEOUT = 1000 * 10;//10s默认packet写超时
// 
//     byte[] EMPTY_BYTES = new byte[0];
// 
//     int DEF_HEARTBEAT = 4 * 60 * 1000;//5min 默认心跳时间
// 
//     int DEF_COMPRESS_LIMIT = 1024;//1k 启用压缩阈值
// 
//     String DEF_OS_NAME = "android";//客户端OS
// 
//     int MAX_RESTART_COUNT = 10;//客户端重连次数超过该值，重连线程休眠10min后再重试
//     int MAX_TOTAL_RESTART_COUNT = 1000;//客户端重连次数超过该值，将不再尝试重连
// 
//     int MAX_HB_TIMEOUT_COUNT = 2;
// 
//     String HTTP_HEAD_READ_TIMEOUT = "readTimeout";
// }


// Path: src/main/java/com/mpush/api/http/HttpRequest.java
import com.mpush.api.Constants;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import static com.mpush.api.Constants.HTTP_HEAD_READ_TIMEOUT;

    }

    public static HttpRequest buildGet(String uri) {
        return new HttpRequest(HttpMethod.GET, uri);
    }

    public static HttpRequest buildPost(String uri) {
        return new HttpRequest(HttpMethod.POST, uri);
    }

    public static HttpRequest buildPut(String uri) {
        return new HttpRequest(HttpMethod.PUT, uri);
    }

    public static HttpRequest buildDelete(String uri) {
        return new HttpRequest(HttpMethod.DELETE, uri);
    }

    public static HttpRequest build(byte method, String uri) {
        return new HttpRequest(method, uri);
    }

    public byte getMethod() {
        return method;
    }

    public String getUri() {
        return uri;
    }

    public Map<String, String> getHeaders() {