HttpPingIndicator class

A health indicator that performs an HTTP GET request to a specified URL and checks the response status code.

Inheritance

Constructors

HttpPingIndicator(String _name, String url, {Duration timeout = const Duration(seconds: 3), int expectedStatusCode = 200})
Creates an HTTP ping indicator.

Properties

expectedStatusCode int
final
hashCode int
The hash code for this object.
no setterinherited
name String
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration
final
url String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pingCheck(RequestContext _) Future<HealthIndicatorCheck>
Returns a map with the status of the specific component. Throws an exception if the component is critically failing.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited