Implemented by adapters which can send a caught call again with their own
HTTP client. The new call goes through the adapter, so it is caught by
NetLens like any other call.
Repository which saves mocks to a JSON file, so mocks recorded once can be
replayed after the app is restarted. The file has the format of
NetLensMockJsonCodec, so it can be shared and loaded in tests.
Reads mocks from an HTTP Archive (HAR 1.2), for example one exported by
NetLens, Chrome DevTools, Proxyman or Charles. Entries without a response
are skipped.
Finds the response which answers a request. HTTP client adapters depend on
this interface only, so they can be tested and used without the rest of
NetLens.
Records calls as mock endpoints and replays them, so the app can be run and
tested offline. It's the entry point of the mocks feature: the inspector,
the HTTP client adapters and NetLensMockServer all go through it.
Local HTTP server which answers requests with mocks. It works with any
HTTP client, including HttpClient from dart:io: point the base URL of the
app at uri. The host of the request is ignored, so mocks recorded against
any backend match.
Reads and writes mocks as a Postman collection (v2.1), which Postman,
Insomnia, Bruno and other API clients can import. Each mock becomes a
request with its response saved as an example, so the collection can also
back a Postman mock server. Requests are grouped in a folder per host.
Describes which values of a call are sensitive. Sensitive values are
replaced with mask in shared and exported calls (text log, cURL, HAR,
copy) and are hidden in the inspector until they are revealed.