Added default param

This commit is contained in:
thomashii 2021-03-21 09:18:46 +08:00
parent 7f257d173f
commit 64d11cc86d

View file

@ -51,11 +51,11 @@ class MockHttpRequest
String? protocolVersion,
String? sessionId,
this.certificate,
required this.persistentConnection}) {
this.persistentConnection = true}) {
_buf = BytesBuilder(copy: copyBuffer != false);
_session = MockHttpSession(id: sessionId ?? 'mock-http-session');
this.protocolVersion =
protocolVersion?.isNotEmpty == true ? protocolVersion! : '1.1';
this.protocolVersion = protocolVersion ?? '1.1';
}
@override