easy_mock_http 0.1.0 copy "easy_mock_http: ^0.1.0" to clipboard
easy_mock_http: ^0.1.0 copied to clipboard

Transport-agnostic HTTP mocking for Flutter VM tests. Intercepts dart:io's HttpClient via HttpOverrides, so Dio, http, or any client is mocked with zero injection — stub with when, assert with verify.

0.1.0 #

  • Initial release: mockHttp() with fluent when / expect / verify verbs.
  • Intercepts dart:io HttpClient via HttpOverrides — covers Dio, package:http, and any other VM transport with zero injection.
  • Request matching by method, URL (path, full URL, or RegExp), and subset matchers for body, headers, and query (values may be flutter_test matchers).
  • Replies via response / statusCode / responseHeaders, plus delay for slow responses and error for transport failures; replyWith for dynamic replies.
  • Records every request (requests) and verifies sends with called / calledOnce / never.
0
likes
0
points
268
downloads

Publisher

verified publisherahmedomar.com.ly

Weekly Downloads

Transport-agnostic HTTP mocking for Flutter VM tests. Intercepts dart:io's HttpClient via HttpOverrides, so Dio, http, or any client is mocked with zero injection — stub with when, assert with verify.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter_test

More

Packages that depend on easy_mock_http