Package ai.preferred.venom.response
Interface Response
-
- All Known Subinterfaces:
Retrievable
,Unwrappable
- All Known Implementing Classes:
BaseResponse
,StorageResponse
,VResponse
public interface Response
- Author:
- Maksim Tkachenko, Truong Quoc Tuan, Ween Jiann Lee
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull String
getBaseUrl()
Deprecated.byte[]
getContent()
Returns raw content of the response.@NotNull org.apache.http.entity.ContentType
getContentType()
Returns the content type of the content fetched.@NotNull org.apache.http.Header[]
getHeaders()
Returns the headers that were used to trigger this response.org.apache.http.HttpHost
getProxy()
Returns the proxy that was used to trigger this response.int
getStatusCode()
Returns status code of the response.@NotNull String
getUrl()
Returns the url used to fetch the response, if the request is redirected, this will be the final requested url.
-
-
-
Method Detail
-
getStatusCode
int getStatusCode()
Returns status code of the response.- Returns:
- int code
-
getContent
byte[] getContent()
Returns raw content of the response.- Returns:
- byte[] content
-
getContentType
@NotNull @NotNull org.apache.http.entity.ContentType getContentType()
Returns the content type of the content fetched.This is provided by the server or guessed by the server or an amalgamation of both.
- Returns:
- an instance of ContentType
-
getHeaders
@NotNull @NotNull org.apache.http.Header[] getHeaders()
Returns the headers that were used to trigger this response.- Returns:
- an array of headers
-
getUrl
@NotNull @NotNull String getUrl()
Returns the url used to fetch the response, if the request is redirected, this will be the final requested url.- Returns:
- stripped down version of requested url
-
getBaseUrl
@Deprecated @NotNull @NotNull String getBaseUrl()
Deprecated.Returns the base form of the url used in this request.- Returns:
- stripped down version of requested url
-
getProxy
@Nullable org.apache.http.HttpHost getProxy()
Returns the proxy that was used to trigger this response.- Returns:
- proxy used
-
-