HttpAgent 添加 Post 请求远程调用.

pull/28/head
chen.ma 3 years ago
parent ac30c14f75
commit 599b70e3c3

@ -31,6 +31,15 @@ public interface HttpAgent {
*/
String getEncode();
/**
* Http post.
*
* @param path
* @param body
* @return
*/
Result httpPost(String path, Object body);
/**
* Send HTTP post request by discovery.
*

@ -41,6 +41,11 @@ public class ServerHttpAgent implements HttpAgent {
return null;
}
@Override
public Result httpPost(String path, Object body) {
return httpClientUtil.restApiPost(buildUrl(path), body, Result.class);
}
@Override
public Result httpPostByDiscovery(String path, Object body) {
return httpClientUtil.restApiPost(buildUrl(path), body, Result.class);

Loading…
Cancel
Save