Schnittstelle RestDelegate


public interface RestDelegate
Interface towards the implementation of the REST client.
Autor:
Stephan Fuhrmann
  • Methodendetails

    • get

      <T> T get(String path, Class<T> resultClass)
      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

      List<Station> postWithListOfStation(String path, Map<String,String> requestParams)
      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

      List<Map<String,String>> postWithListOfMapOfString(String path, Map<String,String> requestParams)
      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

      <T> T post(String path, Map<String,String> requestParams, Class<T> resultClass)
      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.