http_mock_adapter library
Classes
- DioAdapter
-
HttpClientAdapter
extension with data mocking and recording functionality. - DioInterceptor
-
DioInterceptor is a class for mocking
Dio
requests withInterceptor
. - FullHttpRequestMatcher
- FullHttpRequestMatcher is the default matcher and matches the entire URL signature including headers, request body, query parameters etc. If no matcher is specified in the adapter then it uses an instance of the this class.
- HttpRequestMatcher
- This class serves as an abstraction for matching http requests. Consumers can provide customized matchers as per their use case. An instance of this is supplied while creating the DioAdapter or DioInterceptor.
- Matcher
- An abstract class that has a single method matches, which takes in data and determines if pre-defined matching occurs.
- Matchers
- Matchers is an interface for various Matcher types.
- Request
- Request class contains members to hold network request information.
- RequestMethods
- HTTP methods.
- StrictMatchers
- StrictMatchers is an interface for various strict Matcher types.
- UrlRequestMatcher
- UrlRequestMatcher allows one to match the request based on the path of the URL and optionally the HTTP Method (via matchMethod) rather than the entire request signature.
Extensions
- MatchesRequest on RequestOptions
-
MatchesRequest enhances the
RequestOptions
by allowing different types of matchers to validate the data and headers of the request.
Exceptions / Errors
- MockDioException
-
Wrapper of
Dio
'sDioException
Exception.