chance-http-status
A simple chance mixin to generate random http status information
Installation
npm install --save chance-http-status
Usage
const chance = ; const httpStatus = ; chance; chance; // => { // "status": 200, // "message": "successful", // }
API
chance.httpStatus(options) => httpStatusDefinition
options
options.classType
: The type of http status code. Can be one ofinformation
,success
,redirection
,clientError
orserverError
.
httpStatusDefinition
An object with the following properties:
status
A valid http status codemessage
The standard http status message associated with the code