Simulate slow API responses

Dev Proxy allows you to simulate slow API responses by using the LatencyPlugin.

Start, by enabling the plugin in your Dev Proxy configuration file:

{
  "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.14.1/rc.schema.json",
  "plugins": [
    {
      "name": "LatencyPlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
      "configSection": "latencyPlugin"
    }
  ],
  "urlsToWatch": []
}

Next, specify the minimum and maximum delay (in milliseconds) to simulate for your API.

"latencyPlugin": {
  "minMs": 200,
  "maxMs": 10000
}

When a response is delayed, Dev Proxy displays the total duration it was delayed for in the console output.