各异常情况展示优化,增加独立的接口请求页面
This commit is contained in:
@@ -8,7 +8,7 @@ public class ProxyRequestResultVo {
|
||||
private List<HttpHeaderVo> headers;
|
||||
private Integer status;
|
||||
private Long useTime;
|
||||
private Integer bodyLength;
|
||||
private Integer contentLength;
|
||||
private String data;
|
||||
private String errorMsg;
|
||||
|
||||
@@ -60,11 +60,11 @@ public class ProxyRequestResultVo {
|
||||
this.errorMsg = errorMsg;
|
||||
}
|
||||
|
||||
public Integer getBodyLength() {
|
||||
return bodyLength;
|
||||
public Integer getContentLength() {
|
||||
return contentLength;
|
||||
}
|
||||
|
||||
public void setBodyLength(Integer bodyLength) {
|
||||
this.bodyLength = bodyLength;
|
||||
public void setContentLength(Integer contentLength) {
|
||||
this.contentLength = contentLength;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class SwaggerHttpRequestService {
|
||||
HttpResponse httpResponse = httpRequest.timeout(10000).execute();
|
||||
resultVo.setData(httpResponse.body());
|
||||
resultVo.setStatus(httpResponse.getStatus());
|
||||
resultVo.setBodyLength(httpResponse.bodyBytes().length);
|
||||
resultVo.setContentLength(httpResponse.bodyBytes().length);
|
||||
// 设置返回的cookies
|
||||
List<HttpCookie> responseCookies = httpResponse.getCookies();
|
||||
if (CollectionUtils.isNotEmpty(responseCookies)) {
|
||||
|
||||
Reference in New Issue
Block a user