MockRequestMixin mixin base

Request mixin for the purposes of creating mocks using a mocking framework such as Mockito or Mocktail.

base class MockRequest extends Mock with MockRequestMixin {}
Implemented types
  1. @visibleForTesting

Properties

baseUri Uri
finalinherited
body → dynamic
finalinherited
contentLength int?
The size of the request body, in bytes.
getter/setter pairinherited
finalized bool
Whether finalize has been called.
no setterinherited
followRedirects bool
Whether the client should follow redirects while resolving this request.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
finalinherited
includeNullQueryVars bool?
finalinherited
listFormat ListFormat?
finalinherited
maxRedirects int
The maximum number of redirects to follow when followRedirects is true.
getter/setter pairinherited
method String
The HTTP method of the request.
finalinherited
multipart bool
finalinherited
parameters Map<String, dynamic>
finalinherited
parts List<PartValue>
finalinherited
persistentConnection bool
Whether a persistent connection should be maintained with the server.
getter/setter pairinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
tag Object?
finalinherited
uri Uri
finalinherited
url Uri
The URL to which the request will be sent.
finalinherited
useBrackets bool?
finalinherited

Methods

copyWith({String? method, Uri? uri, Uri? baseUri, dynamic body, Map<String, dynamic>? parameters, Map<String, String>? headers, bool? multipart, List<PartValue>? parts, ListFormat? listFormat, bool? useBrackets, bool? includeNullQueryVars, Object? tag}) Request
Makes a copy of this Request, replacing original values with the given ones.
inherited
finalize() → ByteStream
Finalizes the HTTP request in preparation for it being sent.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send() Future<StreamedResponse>
Sends this request.
inherited
toBaseRequest() Future<BaseRequest>
Converts this Chopper Request into a http.BaseRequest.
inherited
toHttpRequest() → Request
Convert this Request to a http.Request
inherited
toMultipartRequest() Future<MultipartRequest>
Convert this Request to a http.MultipartRequest
inherited
toStreamedRequest(Stream<List<int>> bodyStream) → StreamedRequest
Convert this Request to a http.StreamedRequest
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited