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

top.jfunc.http.component.okhttp3.DefaultOkHttp3StreamExtractor Maven / Gradle / Ivy

package top.jfunc.http.component.okhttp3;

import okhttp3.Response;
import okhttp3.ResponseBody;
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 DefaultOkHttp3StreamExtractor extends AbstractStreamExtractor {
    @Override
    protected InputStream doExtract(Response response, HttpRequest httpRequest) throws IOException {
        ResponseBody body = response.body();
        return null == body ? null : body.byteStream();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy