Class Client


  • public class Client
    extends Object
    Client is a wrapper to dialog with a JSON API.
    • Constructor Detail

      • Client

        public Client​(String apiUrl)
        Client constructor.
        Parameters:
        apiUrl - String
    • Method Detail

      • get

        public RawResponse get​(String route)
                        throws IOException
        wraps the doRequest method to do a GET HTTP request.
        Parameters:
        route - String
        Returns:
        RawResponse raw response
        Throws:
        IOException - the io exception
      • post

        public RawResponse post​(String route,
                                String body)
                         throws IOException
        wraps the doRequest method to do a POST HTTP request.
        Parameters:
        route - String
        body - String
        Returns:
        RawResponse raw response
        Throws:
        IOException - the io exception