Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 1.01 KB

multiplelocations.rst

File metadata and controls

25 lines (16 loc) · 1.01 KB

Applying different delays based on URI

Now let's apply different delays based on location. Run the following to create and export a simulation.

delays-capture.sh

Edit the simulation.json file so that the "globalActions" property looks like this:

../../../../simulations/multiple-locations-delay-simulation.json

Now run the following to import the edited simulation.json file and run the simulation:

delays-simulate.sh

You should notice a 2 second delay on responses from echo.jsontest.com/a/b and echo.jsontest.com/b/c, and a 3 second delay on the response from echo.jsontest.com/c/d.

Note

When you use webserver, you should replace or remove any original host pattern in the urlPattern filter, because the endpoint URL is based on Hoverfly webserver address (eg. http://localhost:8888).