Interface HttpService


  • public interface HttpService
    This interface is used to provide details about an HTTP service, to which HTTP requests can be sent.
    • Method Detail

      • httpService

        static HttpService httpService​(java.lang.String baseUrl)
        Create a new instance of HttpService.
        Parameters:
        baseUrl - The URL for the service.
        Returns:
        A new HttpService instance.
        Throws:
        java.lang.IllegalArgumentException - If the provided URL is invalid.
      • httpService

        static HttpService httpService​(java.lang.String host,
                                       boolean secure)
        Create a new instance of HttpService.
        Parameters:
        host - The hostname or IP address for the service.
        secure - True is the secure connection is to be used.
        Returns:
        A new HttpService instance.
      • httpService

        static HttpService httpService​(java.lang.String host,
                                       int port,
                                       boolean secure)
        Create a new instance of HttpService.
        Parameters:
        host - The hostname or IP address for the service.
        port - The port number for the service.
        secure - True is the secure connection is to be used.
        Returns:
        A new HttpService instance.
      • host

        java.lang.String host()
        Returns:
        The hostname or IP address for the service.
      • port

        int port()
        Returns:
        The port number for the service.
      • secure

        boolean secure()
        Returns:
        True is a secure protocol is used for the connection, false otherwise.
      • toString

        java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        The String representation of the service.