Package org.mockserver.templates.engine
Interface TemplateEngine
- All Known Implementing Classes:
JavaScriptTemplateEngine,MustacheTemplateEngine,VelocityTemplateEngine
public interface TemplateEngine
- Author:
- jamesdbloom
-
Method Summary
Modifier and TypeMethodDescription<T> TexecuteTemplate(String template, HttpRequest httpRequest, Class<? extends DTO<T>> dtoClass) <T> TexecuteTemplate(String template, HttpRequest httpRequest, HttpResponse httpResponse, Class<? extends DTO<T>> dtoClass) renderTemplate(String template, HttpRequest httpRequest) Renders a template against the request and returns the raw rendered text, without attempting to deserialize it into anHttpResponse/HttpRequest.
-
Method Details
-
executeTemplate
-
executeTemplate
<T> T executeTemplate(String template, HttpRequest httpRequest, HttpResponse httpResponse, Class<? extends DTO<T>> dtoClass) -
renderTemplate
Renders a template against the request and returns the raw rendered text, without attempting to deserialize it into anHttpResponse/HttpRequest. Used to template the contents of aFileBodyso an externally stored response body can contain template placeholders. Supported by the text-based engines (Velocity, Mustache).
-