Class HttpHighLevelUtil

java.lang.Object
com.luna.common.net.high.HttpHighLevelUtil

public class HttpHighLevelUtil extends Object
Author:
luna
Description:
  • Field Details

    • BOOTSTRAP

      public static final org.apache.hc.core5.http.impl.bootstrap.RequesterBootstrap BOOTSTRAP
    • HTTP_REQUESTER

      public static org.apache.hc.core5.http.impl.bootstrap.HttpRequester HTTP_REQUESTER
  • Constructor Details

    • HttpHighLevelUtil

      public HttpHighLevelUtil()
  • Method Details

    • init

      public static void init()
    • setProxy

      public static void setProxy(int port)
    • setProxy

      public static void setProxy(String hostname, int port)
    • getHost

      public static org.apache.hc.core5.http.HttpHost getHost(String host)
    • doGet

      public static <T> T doGet(String host, String path, Map<String,String> headers, Map<String,String> queries, org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler)
    • doPost

      public static <T> T doPost(String host, String path, Map<String,String> headers, Map<String,String> queries, org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler)
    • doDelete

      public static <T> T doDelete(String host, String path, Map<String,String> headers, Map<String,String> queries, org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler)
    • doPut

      public static <T> T doPut(String host, String path, Map<String,String> headers, Map<String,String> queries, org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler)
    • doRequest

      public static <T> T doRequest(org.apache.hc.core5.http.io.HttpClientResponseHandler<T> responseHandler, org.apache.hc.core5.http.HttpHost httpHost, org.apache.hc.client5.http.classic.methods.HttpUriRequestBase httpUriRequestBase)