123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package com.futu.course.common.entity;
- import org.apache.commons.httpclient.HttpStatus;
- /**
- * http返回结果
- *
- */
- public class HttpResult {
- private int stateCode;
- private String content;
- public String getContent() {
- return content;
- }
- public void setContent(String content) {
- this.content = content;
- }
- public int getStateCode() {
- return stateCode;
- }
- /**
- * 获取请求状态
- * @return:
- */
- public boolean getOK() {
- return this.stateCode == HttpStatus.SC_OK
- || this.stateCode == HttpStatus.SC_MOVED_PERMANENTLY
- || this.stateCode == HttpStatus.SC_MOVED_TEMPORARILY;
- }
- public void setStateCode(int stateCode) {
- this.stateCode = stateCode;
- }
- }
|