Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi all,
Firstly, i'm sorry if this question has been still asked but i didn't find it. And i didn't find similar point into documentation.

I'm looking for mock the following endpoint : /myApi/action?number=MYNUM

To be representative and usefull, we need to dispatch response to dynamics templates respecting the following rule :

  1. All requests whose MYNUM starts with '1A' should respond with the file ex1.json
  2. All requests whose MYNUM starts with '1B' should respond with the file ex2.json
  3. All requests whose MYNUM starts with '3P' should respond with the file ex3.json
  4. All others should respond with the file default.json

For automation use, the "start with" is very important.

I've tried with script but i've never access to the query_parameter.

Has someone a response?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.