public class SlackHttpClient extends Object implements AutoCloseable
| Constructor and Description |
|---|
SlackHttpClient() |
SlackHttpClient(Map<String,String> userAgentCustomInfo) |
SlackHttpClient(okhttp3.OkHttpClient okHttpClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
okhttp3.Response |
delete(okhttp3.Request.Builder requestBuilder) |
okhttp3.Response |
get(String url,
Map<String,String> query,
String token) |
SlackConfig |
getConfig() |
okhttp3.Response |
patchCamelCaseJsonBodyWithBearerHeader(String url,
String token,
Object obj) |
okhttp3.Response |
postCamelCaseJsonBodyWithBearerHeader(String url,
String token,
Object obj) |
okhttp3.Response |
postForm(String url,
okhttp3.FormBody formBody) |
okhttp3.Response |
postFormWithAuthorizationHeader(String url,
String authorizationHeader,
okhttp3.FormBody formBody) |
okhttp3.Response |
postFormWithBearerHeader(String url,
String token,
okhttp3.FormBody formBody) |
okhttp3.Response |
postJsonBody(String url,
Object obj) |
okhttp3.Response |
postMultipart(String url,
String token,
okhttp3.MultipartBody multipartBody) |
okhttp3.Response |
putCamelCaseJsonBodyWithBearerHeader(String url,
String token,
Object obj) |
void |
runHttpResponseListeners(okhttp3.Response response,
String body) |
void |
setConfig(SlackConfig config) |
public SlackHttpClient()
public SlackHttpClient(okhttp3.OkHttpClient okHttpClient)
public void close()
throws Exception
close in interface AutoCloseableExceptionpublic SlackConfig getConfig()
public void setConfig(SlackConfig config)
public okhttp3.Response get(String url, Map<String,String> query, String token) throws IOException
IOExceptionpublic okhttp3.Response postMultipart(String url, String token, okhttp3.MultipartBody multipartBody) throws IOException
IOExceptionpublic okhttp3.Response postForm(String url, okhttp3.FormBody formBody) throws IOException
IOExceptionpublic okhttp3.Response postFormWithBearerHeader(String url, String token, okhttp3.FormBody formBody) throws IOException
IOExceptionpublic okhttp3.Response postFormWithAuthorizationHeader(String url, String authorizationHeader, okhttp3.FormBody formBody) throws IOException
IOExceptionpublic okhttp3.Response postJsonBody(String url, Object obj) throws IOException
IOExceptionpublic okhttp3.Response postCamelCaseJsonBodyWithBearerHeader(String url, String token, Object obj) throws IOException
IOExceptionpublic okhttp3.Response patchCamelCaseJsonBodyWithBearerHeader(String url, String token, Object obj) throws IOException
IOExceptionpublic okhttp3.Response putCamelCaseJsonBodyWithBearerHeader(String url, String token, Object obj) throws IOException
IOExceptionpublic okhttp3.Response delete(okhttp3.Request.Builder requestBuilder)
throws IOException
IOExceptionpublic void runHttpResponseListeners(okhttp3.Response response,
String body)
Copyright © 2020. All rights reserved.