Package top.focess.qq.api.util.network
Class NetworkHandler
- java.lang.Object
-
- top.focess.qq.api.util.network.NetworkHandler
-
public class NetworkHandler extends Object
This is a network util class.
-
-
Constructor Summary
Constructors Constructor Description NetworkHandler(Plugin plugin)Initialize a new network handler with default optionsNetworkHandler(Plugin plugin, top.focess.util.network.NetworkHandler.Options options)Initialize a new network handler with specified options
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description top.focess.util.network.HttpResponseget(String url, Map<String,Object> data, Map<String,String> header)PlugingetPlugin()top.focess.util.network.HttpResponsepost(String url, Map<String,Object> data, Map<String,String> header, okhttp3.MediaType mediaType)top.focess.util.network.HttpResponseput(String url, Map<String,Object> data, Map<String,String> header, okhttp3.MediaType mediaType)top.focess.util.network.HttpResponserequest(String url, Map<String,Object> data, Map<String,String> header, okhttp3.MediaType mediaType, top.focess.util.network.NetworkHandler.RequestType requestType)top.focess.util.network.HttpResponserequest(String url, Map<String,Object> data, top.focess.util.network.NetworkHandler.RequestType requestType)top.focess.util.network.HttpResponserequest(String url, top.focess.util.network.NetworkHandler.RequestType requestType)
-
-
-
Constructor Detail
-
NetworkHandler
public NetworkHandler(Plugin plugin, top.focess.util.network.NetworkHandler.Options options)
Initialize a new network handler with specified options- Parameters:
plugin- the pluginoptions- the options
-
NetworkHandler
public NetworkHandler(Plugin plugin)
Initialize a new network handler with default options- Parameters:
plugin- the plugin
-
-
Method Detail
-
getPlugin
public Plugin getPlugin()
-
request
public top.focess.util.network.HttpResponse request(String url, Map<String,Object> data, top.focess.util.network.NetworkHandler.RequestType requestType)
-
request
public top.focess.util.network.HttpResponse request(String url, top.focess.util.network.NetworkHandler.RequestType requestType)
-
request
public top.focess.util.network.HttpResponse request(String url, Map<String,Object> data, Map<String,String> header, okhttp3.MediaType mediaType, top.focess.util.network.NetworkHandler.RequestType requestType)
-
put
public top.focess.util.network.HttpResponse put(String url, Map<String,Object> data, Map<String,String> header, @NotNull okhttp3.MediaType mediaType)
-
post
public top.focess.util.network.HttpResponse post(String url, Map<String,Object> data, Map<String,String> header, @NotNull okhttp3.MediaType mediaType)
-
-