Motivation: map requests to pre-defined responses, stored in files.
E.g.
stubFor(get(urlPathMatching("/resource/\w*")).willReturn(
ok().withTransformers(ResponseTemplateTransformer.NAME)
.withBodyFile("response/{{request.requestLine.path.[2]}}.json")));
Thanks! i need this. is this in a build of the standalone jar? Ahh... looks like it's not in a release yet. I'm not sure what you're planning on including with 2.19, so i'll just try to build the JAR until then.
Not yet, but will be soon. Couple of other things to add before I push a release.
@tomakehurst, do you have an idea when this feature will be released (in the stand-alone version)?
Fixed in 8a25659f2f854531b673db73937d60785609d5c6
Most helpful comment
Not yet, but will be soon. Couple of other things to add before I push a release.