Template
The following values are analyzed as a Groovy pattern:
Response header value
Response body (
body
)Response filename (
file
)Table key (
key
oftables
)
The following variables are available in a script block ${}
.
Variable | Object |
---|---|
| Path variables |
| Request headers |
| Query parameters |
| Query parameters (alternative name for |
| Request body |
| Request body (alternative name for |
The request body type can be one of the following:
Content type of request | Type of request body |
---|---|
|
|
|
|
|
|
|
|
|
|
Otherwise |
|
For example, create a manifest as follows:
The stub will return the following response on the request GET /users/100
:
File templating
The files also support scripts
Last updated