seglo/grunt-connect-prism — pull request #7 by MilosMosovsky (2014-06-29 08:18:43+00:00)
Title: Add proxy option 'delay' so you can simulate real world response delay

Hey , today i also came up with this idea, when you are in mock mode, responses are almost instant, which is great but when you are developing asynchronous application you need to mock responses like in real world. Now i am developing progress bar, while response is pending, but in mock mode i get response in less than 100 ms and my progress bar or whatever "please wait loading" is rarely shown up.

I added real world response simulation , you can define new option in prism section of gruntfile (on same level as you are defining context, mode and etc for proxy)

Allowed 'delay' values are :
any integer which represent delay in ms
```javascript
server: {
options: {
mode: 'mock',
context: '/api/v1',
delay : 1000
}
}

```

string 'auto' which is generating average response time (from 600 - 2000 ms)
```javascript
server: {
options: {
mode: 'mock',
context: '/api/v1',
delay : 'auto'
}
}

```

string 'fast' which is generating fast response time (from 150 - 1000 ms)
```javascript
server: {
options: {
mode: 'mock',
context: '/api/v1',
delay : 'fast'
}
}

```

string 'slow' which is generating slow response time (from 1500 - 3000 ms)
```javascript
server: {
options: {
mode: 'mock',
context: '/api/v1',
delay : 'slow'
}
}

```

Let me know what you think