public interface ContractTemplate
If no implementation is provided then Handlebars will be picked as a default implementation.
| Modifier and Type | Method and Description |
|---|---|
String |
body()
Request body text (avoid for non-text bodies) e.g.
|
String |
body(String jsonPath)
Request body text for the given JsonPath.
|
String |
closingTemplate()
Handlebars is using the Mustache template thus it looks like this
{{ Mustache }}.
|
String |
cookie(String key)
Retruns the template for retrieving the first value of a cookie with certain key
|
default String |
escapedBody()
Request body text (avoid for non-text bodies) e.g.
|
default String |
escapedBody(String jsonPath)
Request body text for the given JsonPath.
|
default String |
escapedClosingTemplate()
Handlebars is using the Mustache template thus it looks like this
{{{ Mustache }}}.
|
default String |
escapedCookie(String key)
Retruns the template for retrieving the escaped first value of a cookie with certain key
|
default String |
escapedHeader(String key)
Returns the template for retrieving the escaped first value of a request header e.g.
|
default String |
escapedHeader(String key,
int index)
Returns the template for retrieving the esacaped nth value of a request header (zero indexed) e.g.
|
default String |
escapedOpeningTemplate()
Handlebars is using the Mustache template thus it looks like this
{{{ Mustache }}}.
|
default String |
escapedPath()
Returns the template for retrieving a escaped URL path
|
default String |
escapedPath(int index)
Returns the template for retrieving escaped nth value of a URL path (zero indexed) e.g.
|
default String |
escapedQuery(String key)
Returns the template for retrieving escaped first value of a query parameter e.g.
|
default String |
escapedQuery(String key,
int index)
Returns the template for retrieving esacped nth value of a query parameter (zero indexed) e.g.
|
default String |
escapedUrl()
Returns the template for retrieving a escaped URL path and query from request
|
String |
header(String key)
Returns the template for retrieving the first value of a request header e.g.
|
String |
header(String key,
int index)
Returns the template for retrieving the nth value of a request header (zero indexed) e.g.
|
String |
openingTemplate()
Handlebars is using the Mustache template thus it looks like this
{{ Mustache }}.
|
String |
path()
Returns the template for retrieving a URL path
|
String |
path(int index)
Returns the template for retrieving nth value of a URL path (zero indexed) e.g.
|
String |
query(String key)
Returns the template for retrieving first value of a query parameter e.g.
|
String |
query(String key,
int index)
Returns the template for retrieving nth value of a query parameter (zero indexed) e.g.
|
default boolean |
startsWithEscapedTemplate(String text)
Asserts whether the given text starts with proper opening template for escaped value
|
default boolean |
startsWithTemplate(String text)
Asserts whether the given text starts with proper opening template
|
String |
url()
Returns the template for retrieving a URL path and query from request
|
default boolean startsWithTemplate(String text)
default boolean startsWithEscapedTemplate(String text)
String openingTemplate()
String closingTemplate()
default String escapedOpeningTemplate()
default String escapedClosingTemplate()
String url()
String query(String key)
key - String query(String key, int index)
key - index - String path()
String path(int index)
index - String header(String key)
key - String header(String key, int index)
key - index - String cookie(String key)
key - String body()
String body(String jsonPath)
default String escapedUrl()
default String escapedQuery(String key)
key - default String escapedQuery(String key, int index)
key - index - default String escapedPath()
default String escapedPath(int index)
index - default String escapedHeader(String key)
key - default String escapedHeader(String key, int index)
key - index - default String escapedCookie(String key)
key - default String escapedBody()
Copyright © 2016–2018 Spring. All rights reserved.