I'm trying to use Siesta for sending POST request with multiple url parameters.
The problem is even though the solution is presented here, it only shows example for a single parameter. So my question is, is there any other ways to add multiple parameters or should I just use the withParam()
multiple times?
E.g. .withParam("myparam", "1").withParam("myparam2", "1").withParam("myparam3", "1")...
I'm asking because using withParam()
multiple times kinda look messy although it works =)
You’ve answered your own question:
withParam
is chainable, and that is the correct way to add multiple params.It’s quite possible to format it in a tidy way, as in this snippet from the example project:
I would welcome a feature request for a flavor that takes a dictionary if you or others think that would be useful.