com.tukeof.common.core.Wget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-core Show documentation
Show all versions of common-core Show documentation
a common and useful pure java library
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;
}