Skip to content

Commit b196a71

Browse files
Deprecated unused method in HttpUtil
1 parent baa6c60 commit b196a71

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/main/java/org/maxgamer/quickshop/util/HttpUtil.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121

2222
import com.google.common.cache.CacheBuilder;
2323
import lombok.val;
24-
import okhttp3.*;
24+
import okhttp3.Cache;
25+
import okhttp3.OkHttpClient;
26+
import okhttp3.Request;
27+
import okhttp3.RequestBody;
28+
import okhttp3.Response;
2529
import org.jetbrains.annotations.NotNull;
2630
import org.jetbrains.annotations.Nullable;
2731

@@ -36,6 +40,8 @@ public class HttpUtil {
3640
private static final OkHttpClient client = new OkHttpClient.Builder()
3741
.cache(new Cache(getCacheFolder(), 50L * 1024L * 1024L)).build();
3842

43+
44+
@Deprecated
3945
public static HttpUtil create() {
4046
return new HttpUtil();
4147
}
@@ -83,16 +89,24 @@ public static String createGet(@NotNull String url, boolean flushCache) {
8389
return null;
8490
}
8591
}
92+
8693
@NotNull
8794
public static Response makePost(@NotNull String url, @NotNull RequestBody body) throws IOException {
8895
return client.newCall(new Request.Builder().post(body).url(url).build()).execute();
8996
}
97+
9098
@NotNull
9199
private static File getCacheFolder() {
92100
File file = new File(Util.getCacheFolder(), "okhttp_tmp");
93101
file.mkdirs();
94102
return file;
95103
}
104+
105+
public static OkHttpClient getClientInstance() {
106+
return client;
107+
}
108+
109+
@Deprecated
96110
@NotNull
97111
public OkHttpClient getClient() {
98112
return client;

0 commit comments

Comments
 (0)