http_hook library

Classes

HttpHook
Main class for managing HTTP hook rules and intercepting requests.
HttpHookRequest
Represents an intercepted HTTP request.
HttpHookResponse
Represents a mock HTTP response.
MatchResult
Represents the result of a URL match.

Enums

HttpHookMethod
HTTP Method
HttpHookRuleType
Enum describing the types of URL matching for hook rules.

Functions

mockHttp(String url, {HttpHookMethod method = HttpHookMethod.get, String? reply, int statusCode = 200, Map<String, String>? headers, bool autoTearDown = true}) → void
Convenient HTTP mocking function for tests.

Typedefs

HttpHookHandler = FutureOr<HttpHookResponse> Function(HttpHookRequest request, MatchResult match)
Signature for HTTP hook handler functions.