Package com.predic8.membrane.core.http
Class Header
java.lang.Object
com.predic8.membrane.core.http.Header
The headers of an HTTP message.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(HeaderField field) voidvoidaddCookieSession(String cookieName, String value) voidaddRawCookieSession(String cookie) voidclear()booleancontains(HeaderName header) booleanintlongjakarta.mail.internet.ContentTypegetFirstCookie(String cookieName) getFirstValue(HeaderName name) getFirstValue(String name) getHost()getNormalizedValue(String headerName) intgetNumberOf(String headerName) getValues(HeaderName headerName) booleanbooleanbooleanbooleanbooleanbooleanbooleanMethod can be used from Groovy or Javascriptsstatic longparseKeepAliveHeader(String keepAliveHeaderValue, String paramName) voidremove(HeaderField field) voidremoveFields(String name) voidvoidsetAuthorization(String user, String password) voidsetConnection(String connection) voidsetContentLength(long length) voidsetContentType(String type) voidvoidsetLocation(String location) voidvoidsetProxyAuthorization(String value) voidsetSOAPAction(String value) voidvoidsetXForwardedFor(String value) voidsetXForwardedHost(String xForwardedHostHeaderValue) voidsetXForwardedProto(String value) toString()voidwrite(OutputStream out) SinceHttpUtil.readLine(InputStream)assembles the String byte-by-byte converting it to char-by-char, we use ISO-8859-1 for output here.
-
Field Details
-
TRANSFER_ENCODING
- See Also:
-
CONTENT_ENCODING
- See Also:
-
CONTENT_LENGTH
- See Also:
-
CONTENT_TYPE
- See Also:
-
CONNECTION
- See Also:
-
PROXY_CONNECTION
- See Also:
-
HOST
- See Also:
-
EXPECT
- See Also:
-
X_FORWARDED_FOR
- See Also:
-
X_FORWARDED_PROTO
- See Also:
-
X_FORWARDED_HOST
- See Also:
-
PROXY_AUTHORIZATION
- See Also:
-
SOAP_ACTION
- See Also:
-
ACCEPT
- See Also:
-
LOCATION
- See Also:
-
AUTHORIZATION
- See Also:
-
SET_COOKIE
- See Also:
-
COOKIE
- See Also:
-
DESTINATION
- See Also:
-
VALIDATION_ERROR_SOURCE
- See Also:
-
USER_AGENT
- See Also:
-
X_REQUESTED_WITH
- See Also:
-
EXPIRES
- See Also:
-
KEEP_ALIVE
- See Also:
-
SERVER
- See Also:
-
PRAGMA
- See Also:
-
CACHE_CONTROL
- See Also:
-
UPGRADE
- See Also:
-
LAST_MODIFIED
- See Also:
-
IF_MODIFIED_SINCE
- See Also:
-
WWW_AUTHENTICATE
- See Also:
-
ACCESS_CONTROL_ALLOW_ORIGIN
- See Also:
-
ORIGIN
- See Also:
-
X_HTTP_METHOD_OVERRIDE
- See Also:
-
CHUNKED
- See Also:
-
TIMEOUT
- See Also:
-
MAX
- See Also:
-
CLOSE
- See Also:
-
-
Constructor Details
-
Header
public Header() -
Header
- Throws:
IOExceptionEndOfStreamException
-
Header
- Throws:
IOExceptionEndOfStreamException
-
Header
-
-
Method Details
-
add
-
add
-
remove
-
removeFields
-
getValues
-
getFirstValue
-
getFirstValue
-
getAllHeaderFields
-
contains
-
contains
-
write
SinceHttpUtil.readLine(InputStream)assembles the String byte-by-byte converting it to char-by-char, we use ISO-8859-1 for output here.- Throws:
IOException
-
setValue
-
setHost
-
setContentLength
public void setContentLength(long length) -
setProxyAuthorization
-
isChunked
public boolean isChunked() -
getContentLength
public long getContentLength() -
getContentType
-
getUserAgent
-
getContentTypeObject
public jakarta.mail.internet.ContentType getContentTypeObject() throws jakarta.mail.internet.ParseException- Returns:
- An object describing the value of the "Content-Type" HTTP header. Null, if the header is not present.
- Throws:
jakarta.mail.internet.ParseException- if the value of the header could not be parsed.
-
setContentType
-
setLocation
-
getLocation
-
setSOAPAction
-
getAccept
-
setAccept
-
getConnection
-
setConnection
-
getProxyConnection
-
isProxyConnectionClose
public boolean isProxyConnectionClose() -
isConnectionClose
public boolean isConnectionClose() -
hasContentLength
public boolean hasContentLength() -
getHost
-
is100ContinueExpected
public boolean is100ContinueExpected() -
toString
-
setAuthorization
-
setXForwardedFor
-
getXForwardedFor
-
setXForwardedProto
-
getXForwardedProto
-
getContentEncoding
-
getCharset
-
addCookieSession
-
addRawCookieSession
-
getFirstCookie
-
estimateHeapSize
public int estimateHeapSize() -
getNumberOf
-
parseKeepAliveHeader
- Parameters:
keepAliveHeaderValue- the value of the Keep-Alive headerparamName- eitherTIMEOUTorMAX.- Returns:
- the extracted parameter value of the "Keep-Alive" header
-
clear
public void clear() -
setNoCacheResponseHeaders
public void setNoCacheResponseHeaders() -
getAuthorization
-
getWwwAuthenticate
-
getNormalizedValue
-
isBinaryContentType
public boolean isBinaryContentType() -
getXForwardedHost
-
setXForwardedHost
-
isUserAgentSupportsSNI
public boolean isUserAgentSupportsSNI()Method can be used from Groovy or Javascripts
-