Useful helper functions
Leverage useful helper functions within Hoverfly Cloud's templating engine to simplify and enhance your API simulations.
Concatenate two strings
{{ concat '<string1>' '<string2>' }}Search and replace text in a string
{{ replace '<string-to-search>' '<string-to-replace>' '<replacement-string>' }}Create an array from a delimited string
{{ split '<delimited-string>' '<delimiter>' }}Change the HTTP response code
{{ setStatusCode <any-valid-http-response-code> }}Set the value of an HTTP response header
{{ setHeader '<header-name>' '<new-value>'}}PreviousCombining and nesting templating functionsNextAvoiding HTML encoding in function return values
Last updated