Class Headers
java.lang.Object
org.springframework.cloud.contract.spec.internal.Headers
Represents a set of headers of a request / response or a message.
- Since:
- 1.0.0
- Author:
- Marcin Grzejszczak, Olga Maciaszek-Sharma, Tim Ysewyn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept()voidage()allow()allValue()asMap(BiFunction<String, Header, Object> consumer) Converts the headers into their stub side representations and returns as a map of String key => Object value.Converts the headers into their stub side representations and returns as a map of String key => Object value.voidcontentType(String contentType) cookie()date()booleanetag()voidexecuteForEachHeader(Consumer<Header> consumer) expect()expires()from()inthashCode()voidvoidvoidhost()ifMatch()ifRange()imageGif()imagePng()link()location()If for the consumer / producer you want to match exactly only the root of content type.voidmessagingContentType(String contentType) protected NotToEscapePatternnotEscaped(Pattern pattern) origin()pragma()range()referer()server()voidsetEntries(Set<Header> entries) te()textHtml()textXml()toString()trailer()upgrade()vary()via()warning()
-
Constructor Details
-
Headers
public Headers()
-
-
Method Details
-
header
-
header
-
executeForEachHeader
-
headers
-
accept
-
contentType
-
messagingContentType
-
matching
If for the consumer / producer you want to match exactly only the root of content type. I.e.application/json;charset=UTF8you care only aboutapplication/jsonthen you should use this method- Parameters:
value- regex as String- Returns:
- dsl property
-
notEscaped
-
asMap
-
asStubSideMap
Converts the headers into their stub side representations and returns as a map of String key => Object value.- Returns:
- converted map
-
asTestSideMap
Converts the headers into their stub side representations and returns as a map of String key => Object value.- Returns:
- converted map
-
equals
-
hashCode
public int hashCode() -
toString
-
getEntries
-
setEntries
-
messagingContentType
-
accept
-
acceptCharset
-
acceptEncoding
-
acceptLanguage
-
acceptRanges
-
accessControlAllowCredentials
-
accessControlAllowHeaders
-
accessControlAllowMethods
-
accessControlAllowOrigin
-
accessControlExposeHeaders
-
accessControlMaxAge
-
accessControlRequestHeaders
-
accessControlRequestMethod
-
age
-
allow
-
authorization
-
cacheControl
-
connection
-
contentEncoding
-
contentDisposition
-
contentLanguage
-
contentLength
-
contentLocation
-
contentRange
-
contentType
-
cookie
-
date
-
etag
-
expect
-
expires
-
from
-
host
-
ifMatch
-
ifModifiedSince
-
ifNoneMatch
-
ifRange
-
ifUnmodifiedSince
-
lastModified
-
link
-
location
-
max_forwards
-
origin
-
pragma
-
proxyAuthenticate
-
proxyAuthorization
-
range
-
referer
-
retryAfter
-
server
-
setCookie
-
setCookie2
-
te
-
trailer
-
transferEncoding
-
upgrade
-
user_agent
-
vary
-
via
-
warning
-
wwwAuthenticate
-
allValue
-
applicationAtomXml
-
applicationFormUrlencoded
-
applicationJson
-
applicationJsonUtf8
-
applicationOctetStream
-
applicationPdf
-
applicationXhtmlXml
-
applicationXml
-
imageGif
-
imageJpeg
-
imagePng
-
multipartFormData
-
textHtml
-
textMarkdown
-
textPlain
-
textXml
-