Request.simulatedGet constructor

Request.simulatedGet(
  1. String internalPath, {
  2. String? sessionId,
  3. String? id,
  4. RequestParams? queryParams,
  5. HttpConnectionInfo? connectionInfo,
  6. X509Certificate? certificate,
  7. SimulatedHttpHeaders? headers,
  8. List<Cookie>? cookies,
  9. String? bodyStr,
  10. List<int>? bodyBytes,
  11. 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? queryParams,
    HttpConnectionInfo? connectionInfo,
    X509Certificate? certificate,
    SimulatedHttpHeaders? headers,
    List<Cookie>? cookies,
    String? bodyStr,
    List<int>? bodyBytes,
    int? bodyStreamEventSize})
    : _id = id ?? _defaultSimulatedId,
      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();
}