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

top.jfunc.http.component.apache.DefaultApacheResponseStreamExtractor Maven / Gradle / Ivy

package top.jfunc.http.component.apache;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import top.jfunc.http.component.AbstractStreamExtractor;
import top.jfunc.http.request.HttpRequest;

import java.io.IOException;
import java.io.InputStream;

/**
 * @author xiongshiyan at 2020/1/6 , contact me with email [email protected] or phone 15208384257
 */
public class DefaultApacheResponseStreamExtractor extends AbstractStreamExtractor {
    @Override
    public InputStream doExtract(HttpResponse response, HttpRequest httpRequest) throws IOException {
        HttpEntity entity = response.getEntity();
        return null == entity ? null : entity.getContent();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy