Class ServerHttpAgent

  • All Implemented Interfaces:
    HttpAgent

    public class ServerHttpAgent
    extends Object
    implements HttpAgent
    Server Agent
    Author:
    water.lyl
    • Constructor Detail

      • ServerHttpAgent

        public ServerHttpAgent​(Properties properties)
                        throws com.alibaba.nacos.api.exception.NacosException
        Throws:
        com.alibaba.nacos.api.exception.NacosException
    • Method Detail

      • httpPost

        public HttpSimpleClient.HttpResult httpPost​(String path,
                                                    List<String> headers,
                                                    List<String> paramValues,
                                                    String encoding,
                                                    long readTimeoutMs)
                                             throws IOException
        Description copied from interface: HttpAgent
        invoke http post method
        Specified by:
        httpPost in interface HttpAgent
        Parameters:
        path - http path
        headers - http headers
        paramValues - http paramValues http
        encoding - http encode
        readTimeoutMs - http timeout
        Returns:
        HttpResult http response
        Throws:
        IOException - If an input or output exception occurred
      • getAppname

        public static String getAppname()
      • start

        public void start()
                   throws com.alibaba.nacos.api.exception.NacosException
        Description copied from interface: HttpAgent
        start to get nacos ip list
        Specified by:
        start in interface HttpAgent
        Throws:
        com.alibaba.nacos.api.exception.NacosException - on get ip list error.