Class RestClient
java.lang.Object
org.api.manapool.tools.RestClient
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructeur sans authentification.RestClient(String email, String token) Constructeur avec authentification. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> T<T> T<T> T<T> T<T> TvoidsetCallListener(URLCallListener listener2)
-
Field Details
-
logger
protected org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
RestClient
public RestClient()Constructeur sans authentification. -
RestClient
-
-
Method Details
-
get
- Throws:
IOException
-
post
public <T> T post(String url, Object body, Map<String, String> headers, Class<T> responseType) throws IOException- Throws:
IOException
-
put
public <T> T put(String url, Object body, Map<String, String> headers, Class<T> responseType) throws IOException- Throws:
IOException
-
delete
public <T> T delete(String url, Object body, Map<String, String> headers, Class<T> responseType) throws IOException- Throws:
IOException
-
fromJson
-
setCallListener
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-