Package net.anwiba.commons.http
Class Response
- java.lang.Object
-
- net.anwiba.commons.http.Response
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()IOptional<java.util.List<java.lang.String>,java.lang.RuntimeException>cacheControl()voidclose()IOptional<java.lang.String,java.lang.RuntimeException>expires()java.lang.StringgetBody()java.lang.StringgetContentEncoding()longgetContentLength()java.lang.StringgetContentType()java.io.InputStreamgetInputStream()intgetStatusCode()java.lang.StringgetStatusText()java.lang.StringgetUri()IOptional<java.lang.String,java.lang.RuntimeException>pragma()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.anwiba.commons.http.IResponse
isStatusCode2xx
-
-
-
-
Constructor Detail
-
Response
public Response(ICanceler cancelable, java.io.Closeable client, org.apache.hc.client5.http.classic.methods.HttpUriRequest request, org.apache.hc.core5.http.HttpResponse response)
-
-
Method Detail
-
cacheControl
public IOptional<java.util.List<java.lang.String>,java.lang.RuntimeException> cacheControl()
- Specified by:
cacheControlin interfaceIResponse
-
expires
public IOptional<java.lang.String,java.lang.RuntimeException> expires()
-
pragma
public IOptional<java.lang.String,java.lang.RuntimeException> pragma()
-
getBody
public java.lang.String getBody() throws java.io.IOException
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCodein interfaceIResponse
-
getStatusText
public java.lang.String getStatusText()
- Specified by:
getStatusTextin interfaceIResponse
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException- Specified by:
getInputStreamin interfaceIResponse- Throws:
java.io.IOException
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceIResponse
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentTypein interfaceIResponse
-
getContentEncoding
public java.lang.String getContentEncoding()
- Specified by:
getContentEncodingin interfaceIResponse
-
close
public void close() throws java.io.IOException
-
-