diff --git a/package.json b/package.json index b4da79a..ea8c227 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "interfake", "preferGlobal": true, - "version": "1.3.0", + "version": "1.4.0", "author": "Daniel Hough ", "description": "A simple way to create dummy APIs", "contributors": [ diff --git a/readme.md b/readme.md index 19ed7c1..96bee56 100644 --- a/readme.md +++ b/readme.md @@ -168,6 +168,7 @@ interfake.listen(3000); // The server will listen on port 3000 * `#status(statusCode)`: Set the response status code for the endpoint * `#body(body)`: Set the JSON response body of the end point * `#delay(milliseconds)`: Set the number of milliseconds to delay the response by to mimic network of processing lag + * Also accepts a delay range in the format 'ms..ms' e.g. '50..100' * `#create#get|post|put|delete(url)`: Specify an endpoint to create *after* the first execution of this one. API is the same as above. ## Method 2: Command line @@ -302,6 +303,7 @@ I tested this on my Mac. If you have trouble on Windows or any other platform, [ ## Version History +* 1.4.0: Can specify delay range using `delay(10..50)` (by [bruce-one](https://github.com/bruce-one)) * 1.3.0: Can mimic slow responses using `delay()` (by [bruce-one](https://github.com/bruce-one)) * 1.2.0: Added ability to do static files * 1.1.1: Fixed the response to `POST /_request` to be a 201, and `POST /_requests` is now the path used