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

com.tukeof.common.core.Wget Maven / Gradle / Ivy

The newest version!
package com.tukeof.common.core;

import com.tukeof.common.annotation.Nullable;

import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.util.Map;

public interface Wget {

    @Nullable
    Req prepare(String url, String method,
                @Nullable Map headers, @Nullable String body);

    @Nullable
    Req prepare(String url, String method,
                @Nullable Map headers, @Nullable byte[] body);

    Resp request(Req req) throws IOException;

    void save(Resp resp, String path) throws IOException;

    String string(Resp resp) throws IOException;

    byte[] bytes(Resp resp) throws IOException;

    Reader reader(Resp resp) throws IOException;

    InputStream inputStream(Resp resp) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy