NetLensPostmanCollectionCodec class
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.
Binary response bodies can't be stored in a collection, so their examples have an empty body.
- Implemented types
Constructors
- NetLensPostmanCollectionCodec()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canImport(
Object? json) → bool -
Returns true when
jsonhas the format of this importer.override -
decode(
String content) → List< NetLensMock> - Returns mocks of a collection written by encode or by an API client.
-
encode(
List< NetLensMock> mocks, {String name = 'NetLens'}) → String -
Returns
mocksas a collection namedname. -
import(
Object? json) → List< NetLensMock> -
Returns mocks found in
json.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited