Request constructor
Request({})
peerAddress is the address itself; peerAddressOf reads it the
first time peerAddress is asked for, for a server that has it as text
and would otherwise parse it for every request, most of which never
look. Given both, peerAddressOf wins.
Implementation
Request({
required this.method,
required this.url,
required this.headers,
required Stream<List<int>> bodyStream,
Map<String, String>? params,
DVPeerAddress? peerAddress,
DVPeerAddress? Function()? peerAddressOf,
}) : _peerAddress = peerAddress,
_peerAddressOf = peerAddressOf,
params = params == null
? <String, String>{}
: Map<String, String>.from(params),
body = Body(bodyStream);