Request.simulatedPost constructor
Request.simulatedPost(
- String internalPath,
- RequestParams? postParams, {
- String? sessionId,
- String? id,
- RequestParams? queryParams,
- HttpConnectionInfo? connectionInfo,
- X509Certificate? certificate,
- SimulatedHttpHeaders? headers,
- List<
Cookie> ? cookies, - String? bodyStr,
- List<
int> ? bodyBytes, - int? bodyStreamEventSize,
Constructor for a simulated Post request.
Note: postParams
is mandatory, but it can contain no actual parameters.
See Request.simulated for details.
Implementation
Request.simulatedPost(String internalPath, this.postParams,
{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('POST', 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();
}