
net.anthavio.httl.transport.HttpClient3Response Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hatatitla Show documentation
Show all versions of hatatitla Show documentation
Compact but tweakable REST client library you have been dreaming of
The newest version!
package net.anthavio.httl.transport;
import java.io.IOException;
import java.io.InputStream;
import net.anthavio.httl.HttlRequest;
import net.anthavio.httl.HttlResponse;
import net.anthavio.httl.HttlSender.Multival;
import org.apache.commons.httpclient.HttpMethodBase;
/**
*
* @author martin.vanek
*
*/
public class HttpClient3Response extends HttlResponse {
private static final long serialVersionUID = 1L;
private transient HttpMethodBase httpMethod; //not serializable
public HttpClient3Response(HttlRequest request, int code, String message, Multival headers,
InputStream stream, HttpMethodBase httpMethod) throws IOException {
super(request, code, message, headers, stream);
if (httpMethod == null) {
throw new IllegalArgumentException("Null httpMethod");
}
this.httpMethod = httpMethod;
}
/*
@Override
public void close() {
//httpMethod.releaseConnection();
}
*/
/**
* Hackish access to HttpMethod
*/
public HttpMethodBase getHttpMethod() {
return this.httpMethod;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy