public class HttpUtils extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
HttpUtils.KeyValue |
static class |
HttpUtils.StreamBody |
public HttpUtils(String url)
public HttpUtils enablePrintln(boolean enable)
public HttpUtils multipart(boolean multipart)
public HttpUtils data(String key, String filename, InputStream inputStream, String contentType)
public HttpUtils bodyRaw(byte[] bytes)
public HttpUtils bodyRaw(InputStream raw)
public HttpUtils bodyRaw(InputStream raw, String contentType)
public okhttp3.Response exec(String mothod) throws IOException
IOExceptionpublic String exec2(String mothod) throws IOException
IOExceptionpublic int exec3(String mothod) throws IOException
IOExceptionpublic String get() throws IOException
IOExceptionpublic String post() throws IOException
IOExceptionpublic void postAsync()
throws IOException
IOExceptionpublic void postAsync(ConsumerEx3<Boolean,okhttp3.Response,Exception> callback) throws IOException
IOExceptionpublic void headAsync(ConsumerEx3<Boolean,okhttp3.Response,Exception> callback) throws IOException
IOExceptionpublic String put() throws IOException
IOExceptionpublic String patch() throws IOException
IOExceptionpublic String delete() throws IOException
IOExceptionpublic static String getString(String url) throws IOException
IOExceptionCopyright © 2020. All rights reserved.