Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different POST based on body? #72

Open
vallieres opened this issue Jul 6, 2020 · 0 comments
Open

Different POST based on body? #72

vallieres opened this issue Jul 6, 2020 · 0 comments

Comments

@vallieres
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant