各异常情况展示优化,增加独立的接口请求页面

This commit is contained in:
暮光:城中城
2021-11-14 23:05:24 +08:00
parent 4254f73603
commit 1ba75d3e29
11 changed files with 552 additions and 67 deletions

View File

@@ -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;
}
}

View File

@@ -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)) {