node-easymock
node-easymock copied to clipboard
Different POST based on body?
I read the manual but I can't figure out if it's possible.
Imagine we have:
POST /jedis
with a body of name=obiwan
POST /jedis
with a body of name=darthmaul
I want the first one to return 200 Success but the second one to return 400 Bad Request.
From what I read in the documentation, I do not know how to write two files with the same name (but different content).
I am guessing jedis_post.json
is the name of the first file, but what about the second one?
If I name the routes differently, I managed to get a 200 and a 400, but the idea here is I'm trying to have twice the same request but with different body; and from that body return success or error.