研究生接口请求新增Referer请求头

old-package
lensfrex 2 years ago
parent 950e3ca948
commit 12648a7ad0
Signed by: lensfrex
GPG Key ID: 947ADABD8533C476
  1. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/service/graduate/GraduateStudentInfoApiService.java
  2. 2
      mywust-core/src/main/java/cn/linghang/mywust/core/service/graduate/GraduateTrainingPlanApiService.java

@ -17,6 +17,8 @@ public class GraduateStudentInfoApiService extends GraduateApiServiceBase {
public String getPage(String cookie, RequestClientOption option) throws ApiException, IOException { public String getPage(String cookie, RequestClientOption option) throws ApiException, IOException {
HttpRequest request = GraduateRequestFactory.studentInfoRequest(cookie); HttpRequest request = GraduateRequestFactory.studentInfoRequest(cookie);
request.addHeaders("Referer", "http://59.68.177.189/pyxx/leftmenu.aspx");
HttpResponse response = requester.get(request, option); HttpResponse response = requester.get(request, option);
super.checkResponse(response); super.checkResponse(response);

@ -17,6 +17,8 @@ public class GraduateTrainingPlanApiService extends GraduateApiServiceBase {
public String getPage(String cookie, RequestClientOption option) throws IOException, ApiException { public String getPage(String cookie, RequestClientOption option) throws IOException, ApiException {
HttpRequest request = GraduateRequestFactory.trainingPlanPageRequest(cookie); HttpRequest request = GraduateRequestFactory.trainingPlanPageRequest(cookie);
request.addHeaders("Referer", "http://59.68.177.189/pyxx/leftmenu.aspx");
HttpResponse response = requester.get(request, option); HttpResponse response = requester.get(request, option);
super.checkResponse(response); super.checkResponse(response);

Loading…
Cancel
Save