v5.1.2
- feat: make success(), badRequest() and interError() more easier to call
now you can just success({name: 'albert'})
, a HTTP 200 with HTTP body {name:'albert'}
will be returned
If you want to change the statusCode
and headers
, you can add an 2nd parameter when invoking like:
success({name:'albert'}, {statusCode: 201, headers: { hidden: 1 }})