Request.simulatedGet constructor
Request.simulatedGet(
- String internalPath, {
- String? sessionId,
- String? id,
- RequestParams? pathParams,
- RequestParams? queryParams,
- HttpConnectionInfo? connectionInfo,
- X509Certificate? certificate,
- SimulatedHttpHeaders? headers,
- List<
Cookie> ? cookies, - String? bodyStr,
- List<
int> ? bodyBytes, - int? bodyStreamEventSize,
Convenience method for creating a simulated GET request.
See Request.simulated for details.
Implementation
Request.simulatedGet(String internalPath,
{String? sessionId,
String? id,
RequestParams? pathParams,
RequestParams? queryParams,
HttpConnectionInfo? connectionInfo,
X509Certificate? certificate,
SimulatedHttpHeaders? headers,
List<Cookie>? cookies,
String? bodyStr,
List<int>? bodyBytes,
int? bodyStreamEventSize})
: _id = id ?? _defaultSimulatedId,
_server = Server(),
pathParams = pathParams ?? RequestParams._internalConstructor(),
queryParams = queryParams ?? RequestParams._internalConstructor(),
_sessionUsingCookies = true,
_coreRequest = _CoreRequestSimulated('GET', internalPath,
sessionId: sessionId ?? '',
queryParams: queryParams,
certificate: certificate,
connectionInfo: connectionInfo,
headers: headers ?? SimulatedHttpHeaders(),
cookies: cookies ?? <Cookie>[],
bodySteamEventSize: bodyStreamEventSize,
bodyStr: bodyStr,
bodyBytes: bodyBytes),
_coreResponse = _CoreResponseSimulated() {
// Important: this must be a constructor and not a factory.
// Some tests may implement their own subclass of it.
_constructorCommon();
}