package org.bee.webBee.HttpClient;

import org.apache.http.client.methods.CloseableHttpResponse;

/**
 * 封装HTTP响应
 *
 * data 2017-03-25   16:55
 * E-mail   sis.nonacosa@gmail.com
 * @author sis.nonacosa
 */
public class HttpResponse {
}

@@ -29,16 +29,17 @@
 lient;%0A%0A
+%0A
 import o
@@ -95,144 +95,1493 @@
 se;%0A
-%0A/**%0A * %E5%B0%81%E8%A3%85HTTP%E5%93%8D%E5%BA%94%0A *%0A * data 2017-03-25   16:55%0A * E-mail   sis.nonacosa@gmail.com%0A * @author sis.nonacosa%0A */%0Apublic class HttpResponse %7B
+import org.apache.http.client.methods.HttpRequestBase;%0Aimport org.apache.http.impl.client.CloseableHttpClient;%0Aimport org.apache.http.impl.client.HttpClientBuilder;%0Aimport org.bee.webBee.linker.Request;%0Aimport org.bee.webBee.processor.Setting;%0Aimport org.bee.webBee.processor.Task;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * %E5%B0%81%E8%A3%85HTTP%E5%93%8D%E5%BA%94%0A *%0A * data 2017-03-25   16:55%0A * E-mail   sis.nonacosa@gmail.com%0A * @author sis.nonacosa%0A */%0Apublic class HttpResponse %7B%0A%0A    private Request request;%0A%0A    private Task task;%0A%0A    public HttpResponse(Request request, Task task)%7B%0A        this.request = request;%0A        this.task = task;%0A    %7D%0A    public CloseableHttpResponse getResponse()   %7B%0A        CloseableHttpResponse closeableHttpResponse = null;%0A        try %7B%0A            Setting setting = task.getSetting();%0A%0A            HttpRequestBase httpMethod ;%0A            httpMethod = HttpClientPool.getInstance().generateHttpMethod(request,task,null);%0A%0A            HttpClientBuilder httpClientBuilder = HttpClientPool.getInstance().generateClient(setting,httpMethod);%0A            CloseableHttpClient closeableHttpClient = httpClientBuilder.build();%0A             closeableHttpResponse = closeableHttpClient.execute(httpMethod);%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A            System.out.println(e);%0A        %7D%0A        return closeableHttpResponse;%0A    %7D%0A%0A    public static HttpResponse getInstance(Request request, Task task)%7B%0A        return new HttpResponse(request,task);%0A    %7D
 %0A%7D%0A

resolve HttpResponse