Interface HttpAgent
-
- All Known Implementing Classes:
MetricsHttpAgent,ServerHttpAgent
public interface HttpAgentHttpAgent- Author:
- Nacos
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetEncode()get encodeStringgetName()get nameStringgetNamespace()get namespaceStringgetTenant()get tenantHttpSimpleClient.HttpResulthttpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http delete methodHttpSimpleClient.HttpResulthttpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http get methodHttpSimpleClient.HttpResulthttpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)invoke http post methodvoidstart()start to get nacos ip list
-
-
-
Method Detail
-
start
void start() throws com.alibaba.nacos.api.exception.NacosExceptionstart to get nacos ip list- Throws:
com.alibaba.nacos.api.exception.NacosException- on get ip list error.
-
httpGet
HttpSimpleClient.HttpResult httpGet(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
invoke http get method- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- http timeout- Returns:
- HttpResult http response
- Throws:
IOException- If an input or output exception occurred
-
httpPost
HttpSimpleClient.HttpResult httpPost(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
invoke http post method- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- http timeout- Returns:
- HttpResult http response
- Throws:
IOException- If an input or output exception occurred
-
httpDelete
HttpSimpleClient.HttpResult httpDelete(String path, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs) throws IOException
invoke http delete method- Parameters:
path- http pathheaders- http headersparamValues- http paramValues httpencoding- http encodereadTimeoutMs- http timeout- Returns:
- HttpResult http response
- Throws:
IOException- If an input or output exception occurred
-
getName
String getName()
get name- Returns:
- String
-
getNamespace
String getNamespace()
get namespace- Returns:
- String
-
getTenant
String getTenant()
get tenant- Returns:
- String
-
getEncode
String getEncode()
get encode- Returns:
- String
-
-