RRick Markinsfeat(status): Custom status response (#192)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(status): Custom status response (#192) * Added statusOkResponse to configuration The new configuration property: statusOkResponse will allow to globally configure the HTTP response body, used to respond with on a successful healthcheck. * Memoize the value of statusOkResponse When no healthtchecks were defined, the value of statusOkResponse would be returned as is. Therefore, memoizing its string representation would boost performance. * Added statusErrorResponse to configuration The new configuration property: statusErrorResponse will allow to globally configure the HTTP response body, used to respond with on an unsuccessful healthcheck. An unsuccessful healthcheck may override the global statusErrorResponse property by setting the statusResponse property on the Error object. * Incorporated use of headers | 3 年前 | |
feat(error): custom message (#81) BREAKING CHANGE ``` // change from const terminus = require('@godaddy/terminus') terminus(server, options) // change to: const {createTerminus} = require('@godaddy/terminus') createTerminus(server, options) ``` | 7 年前 | |
feat(error): custom message (#81) BREAKING CHANGE ``` // change from const terminus = require('@godaddy/terminus') terminus(server, options) // change to: const {createTerminus} = require('@godaddy/terminus') createTerminus(server, options) ``` | 7 年前 | |
feat(status): Custom status response (#192) * Added statusOkResponse to configuration The new configuration property: statusOkResponse will allow to globally configure the HTTP response body, used to respond with on a successful healthcheck. * Memoize the value of statusOkResponse When no healthtchecks were defined, the value of statusOkResponse would be returned as is. Therefore, memoizing its string representation would boost performance. * Added statusErrorResponse to configuration The new configuration property: statusErrorResponse will allow to globally configure the HTTP response body, used to respond with on an unsuccessful healthcheck. An unsuccessful healthcheck may override the global statusErrorResponse property by setting the statusResponse property on the Error object. * Incorporated use of headers | 3 年前 | |
feat(status): Custom status response (#192) * Added statusOkResponse to configuration The new configuration property: statusOkResponse will allow to globally configure the HTTP response body, used to respond with on a successful healthcheck. * Memoize the value of statusOkResponse When no healthtchecks were defined, the value of statusOkResponse would be returned as is. Therefore, memoizing its string representation would boost performance. * Added statusErrorResponse to configuration The new configuration property: statusErrorResponse will allow to globally configure the HTTP response body, used to respond with on an unsuccessful healthcheck. An unsuccessful healthcheck may override the global statusErrorResponse property by setting the statusResponse property on the Error object. * Incorporated use of headers | 3 年前 |