Package com.mendix.http
Interface HttpResponse
- All Superinterfaces:
AutoCloseable
After receiving and interpreting a request message, a server responds with an HTTP response message.
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the headers of this response.Obtains the content of this response, if any.getFirstHeader
(String name) Returns the first header with a specified name of this response.getHeaders
(String name) Returns all the headers with a specified name of this response.Returns the http version for this response.Returns the reason phrase for this response.int
Returns the status code for this response.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
getHttpVersion
String getHttpVersion()Returns the http version for this response.- Returns:
- the http version for this response
-
getStatusCode
int getStatusCode()Returns the status code for this response.- Returns:
- the status code for this response
-
getReasonPhrase
String getReasonPhrase()Returns the reason phrase for this response.- Returns:
- the reason phrase for this response
-
getAllHeaders
HttpHeader[] getAllHeaders()Returns all the headers of this response.- Returns:
- all the headers of this response
-
getHeaders
Returns all the headers with a specified name of this response.- Parameters:
name
- the name of the headers to return- Returns:
- the headers whose name property equals name
-
getFirstHeader
Returns the first header with a specified name of this response.- Parameters:
name
- the name of the header to return- Returns:
- the first header whose name property equals name or null if no such header could be found
-
getContent
InputStream getContent()Obtains the content of this response, if any.- Returns:
- the content of this response, or null when there is no content
-