java.lang.Object
com.renomad.minum.web.Headers
Details extracted from the headers. For example,
is this a keep-alive connection? what is the content-length,
and so on.
Here is some detail from Wikipedia on the subject:
HTTP header fields are a list of strings sent and received by both the client program and server on every HTTP request and response. These headers are usually invisible to the end-user and are only processed or logged by the server and client applications. They define how information sent/received through the connection are encoded (as in Content-Encoding), the session verification and identification of the client (as in browser cookies, IP address, user-agent) or their anonymity thereof (VPN or proxy masking, user-agent spoofing), how the server should handle data (as in Do-Not-Track), the age (the time it has resided in a shared cache) of the document being downloaded, amongst others.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Given the list of headers, find the one with the length of the body of the POST and return that value as an integer.Gets the one content-type header, or returns an empty stringboolean
boolean
Indicates whether the headers in this request have a Connection: closeint
hashCode()
boolean
Indicates whether the headers in this request have a Connection: Keep-AlivetoString()
valueByKey
(String key) Allows a user to obtain any header value by its key, case-insensitively
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Headers
-
-
Method Details
-
getHeaderStrings
-
contentType
Gets the one content-type header, or returns an empty string -
contentLength
public int contentLength()Given the list of headers, find the one with the length of the body of the POST and return that value as an integer. If we do not find a content length, return -1. -
hasKeepAlive
public boolean hasKeepAlive()Indicates whether the headers in this request have a Connection: Keep-Alive -
hasConnectionClose
public boolean hasConnectionClose()Indicates whether the headers in this request have a Connection: close -
valueByKey
Allows a user to obtain any header value by its key, case-insensitively- Returns:
- a
List
of string values, or null if no header was found.
-
equals
-
hashCode
public int hashCode() -
toString
-