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