NotificationHttpClient class

HTTP client abstraction for dispatching notification webhook requests securely.

Constructors

NotificationHttpClient({Duration timeout = const Duration(seconds: 5), int maxRetries = 2, Future<HttpResponseData> mockHandler(String url, {required String body, required Map<String, String> headers, required String method})?})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxRetries → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postJson(String url, {required Map<String, dynamic> jsonPayload, Map<String, String> headers = const {}, bool dryRun = false}) → Future<HttpResponseData>
Dispatches an HTTP request to url.
sendRequest(String url, {required String method, required Map<String, String> headers, required String body, bool dryRun = false}) → Future<HttpResponseData>
Dispatches an HTTP request to url with retry logic and timeout.
toString() → String
A string representation of this object.
inherited

Operators

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