
com.aliyuncs.http.HttpResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aliyun-java-sdk-core Show documentation
Show all versions of aliyun-java-sdk-core Show documentation
Aliyun Open API SDK for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
http://www.aliyun.com
The newest version!
package com.aliyuncs.http;
public class HttpResponse extends HttpMessage {
private int status;
private String reasonPhrase;
public HttpResponse(String strUrl) {
super(strUrl);
}
public HttpResponse() {
}
@Override
public void setHttpContent(byte[] content, String encoding, FormatType format) {
this.httpContent = content;
this.encoding = encoding;
this.httpContentType = format;
}
@Override
public String getHeaderValue(String name) {
String value = this.headers.get(name);
if (null == value) {
value = this.headers.get(name.toLowerCase());
}
return value;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public boolean isSuccess() {
return 200 <= this.status && this.status < 300;
}
public String getReasonPhrase() {
return reasonPhrase;
}
public void setReasonPhrase(String reasonPhrase) {
this.reasonPhrase = reasonPhrase;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy