|
@@ -165,12 +165,19 @@ public abstract class CloudClientSupport {
|
|
|
|
|
|
if (INTERFACE_LOG.isInfoEnabled()) {
|
|
if (INTERFACE_LOG.isInfoEnabled()) {
|
|
INTERFACE_LOG.info("[CALL-IN]. url=" + url);
|
|
INTERFACE_LOG.info("[CALL-IN]. url=" + url);
|
|
- if (body instanceof JsonSerializable) {
|
|
|
|
|
|
+ if (null == body) {
|
|
|
|
+ INTERFACE_LOG.info("[CALL-REQ]. request= void");
|
|
|
|
+ } else if (body instanceof JsonSerializable) {
|
|
INTERFACE_LOG.info("[CALL-REQ]. request=" + JsonUtil.toJson(body, excludeFields));
|
|
INTERFACE_LOG.info("[CALL-REQ]. request=" + JsonUtil.toJson(body, excludeFields));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- HttpEntity<Object> requestEntity = new HttpEntity<Object>(body, requestHeaders);
|
|
|
|
|
|
+ HttpEntity<Object> requestEntity = null;
|
|
|
|
+ if (null == body) {
|
|
|
|
+ requestEntity = new HttpEntity<Object>(requestHeaders);
|
|
|
|
+ } else {
|
|
|
|
+ requestEntity = new HttpEntity<Object>(body, requestHeaders);
|
|
|
|
+ }
|
|
|
|
|
|
T respBody = null;
|
|
T respBody = null;
|
|
try {
|
|
try {
|
|
@@ -230,6 +237,16 @@ public abstract class CloudClientSupport {
|
|
exchange(url, HttpMethod.POST, body, null);
|
|
exchange(url, HttpMethod.POST, body, null);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * post请求
|
|
|
|
+ *
|
|
|
|
+ * @param requestMapping
|
|
|
|
+ */
|
|
|
|
+ protected void post(String appName, String requestMapping) {
|
|
|
|
+ String url = buildUrl(appName, requestMapping);
|
|
|
|
+ exchange(url, HttpMethod.POST, null, null);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 文件表单提交
|
|
* 文件表单提交
|
|
*
|
|
*
|