Interface HttpMessage
- All Known Subinterfaces:
HttpRequest, HttpResponse
- All Known Implementing Classes:
DefaultHttpResponse, HttpRequestImpl
public interface HttpMessage
An HTTP message, the ancestor of HTTP request & response.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsHeader(String name) Tells if the message contains some headerGets theContent-Typeheader of the message.Returns the value of the HTTP header with the specified name.The HTTP version of the messageboolean
-
Method Details
-
getProtocolVersion
-
getContentType
-
isKeepAlive
boolean isKeepAlive()- Returns:
trueif this message enables keep-alive connection.
-
getHeader
Returns the value of the HTTP header with the specified name. If more than one header with the given name is associated with this request, one is selected and returned.- Parameters:
name- The name of the desired header- Returns:
- The header value - or null if no header is found with the specified name
-
containsHeader
Tells if the message contains some header- Parameters:
name- the Header's name we are looking for- Returns:
trueif the HTTP header with the specified name exists in this request.
-
getHeaders
-