Package de.sfuhrm.radiobrowser4j
Schnittstelle RestDelegate
public interface RestDelegate
Interface towards the implementation of the REST
client.
- Autor:
- Stephan Fuhrmann
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibung<T> TSends a GET request to the remote server.<T> TSends a POST request to the remote server.postWithListOfMapOfString(String path, Map<String, String> requestParams) Sends a POST request to the remote server.postWithListOfStation(String path, Map<String, String> requestParams) Sends a POST request to the remote server.
-
Methodendetails
-
get
Sends a GET request to the remote server.- Typparameter:
T- the expected return type.- Parameter:
path- the path on the web server.resultClass- the result class to retrieve.- Gibt zurück:
- an instance of the result class.
-
postWithListOfStation
Sends a POST request to the remote server. The body gets transferred as "application/x-www-form-urlencoded" encoded data.- Parameter:
path- the path on the web server.requestParams- the request parameters to send as the POST body in "application/x-www-form-urlencoded" encoding.- Gibt zurück:
- the resulting type.
- Löst aus:
RadioBrowserException- if the sever sent a non-OK response.
-
postWithListOfMapOfString
Sends a POST request to the remote server. The body gets transferred as "application/x-www-form-urlencoded" encoded data.- Parameter:
path- the path on the web server.requestParams- the request parameters to send as the POST body in "application/x-www-form-urlencoded" encoding.- Gibt zurück:
- the resulting type.
- Löst aus:
RadioBrowserException- if the sever sent a non-OK response.
-
post
Sends a POST request to the remote server. The body gets transferred as "application/x-www-form-urlencoded" encoded data.- Typparameter:
T- the expected return type.- Parameter:
path- the path on the web server.requestParams- the request parameters to send as the POST body in "application/x-www-form-urlencoded" encoding.resultClass- the expected resulting class wrapped in a generic type.- Gibt zurück:
- the resulting type.
- Löst aus:
RadioBrowserException- if the sever sent a non-OK response.
-