Unable to find "IfBody" method on ApiStub object
Closed this issue · 2 comments
Dileep17 commented
Hi!
In doc of the stubbery, I found below. A way to return response based on the body posted.
// Will only respond if the body contains the string "bodyCondition". sut.Post("/testget", (req, args) => "testresponse") .IfBody(s => s.ReadAsString().Contains("bodyCondition"));
There seems to be no IfBody
method on ApiStub() object.
Is this replaced with any new method ? Please correct me if Im doing something wrong here!
Thank you in advance.
markvincze commented
Hi @Dileep17,
That feature was removed due to causing some problems, but the documentation wasn't adjusted. I fixed the docs now, and will try to investigate how we can reintroduce this feature.
Cheers,
Mark
markvincze commented