Hello all! I’m trying to figure out how I can mock two different responses when the URL for both requests is identical.
Here’s an example: let’s say I’ve got a GET URL which returns a list of cats. The list of cats returned will vary by who is asking, which is specified by the token that is passed in the header. So if I pass in a token for the admin, I’ll get all the cats, but if I pass in a token for a user, I’ll get just the user’s cats.
How can I set up mocking for this situation, where the URL is identical, but the header passed in is different? Will the mock server recognize the header value? If so, can you provide me with an example? Thanks in advance!