请求工具新增无内容返回时处理

This commit is contained in:
egan
2022-03-20 23:45:40 +08:00
parent ab775eefd2
commit a4140dab5c

View File

@@ -284,6 +284,9 @@ public class ClientHttpRequest<T> extends HttpEntityEnclosingRequestBase impleme
final StatusLine statusLine = response.getStatusLine();
final HttpEntity entity = response.getEntity();
if (null == entity){
return null;
}
String[] value = null;
if (null == entity.getContentType()) {
value = new String[]{"application/x-www-form-urlencoded"};