HttpHealthIndicator
The HTTPHealthIndicator contains health indicators which are used for health checks related to HTTP requests
class HttpHealthIndicator extends HealthIndicator {
pingCheck(key: string, url: string, __2: AxiosRequestConfig & { httpClient?: HttpClientLike; } = {}): Promise<HealthIndicatorResult>
responseCheck<T>(key: string, url: string | URL, callback: (response: AxiosResponse<T>) => boolean | Promise<boolean>, __3: AxiosRequestConfig & { httpClient?: HttpClientLike; } = {}): Promise<HealthIndicatorResult>
// inherited from terminus/lib/HealthIndicator
protected getStatus(key: string, isHealthy: boolean, data?: { [key: string]: any; }): HealthIndicatorResult
}
Methods
pingCheck() |
---|
Checks if the given url response in the given timeout and returns a result object corresponding to the result |
ParametersExamples
Returns
Throws
|
responseCheck() | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters
Returns
|