Request class base
This class represents an HTTP request that can be made with Chopper.
- Implementers
Constructors
-
Request(String method, Uri uri, Uri baseUri, {dynamic body, Map<
String, dynamic> ? parameters, Map<String, String> headers = const {}, bool multipart = false, List<PartValue> parts = const [], Object? tag, ListFormat? listFormat, @Deprecated('Use listFormat instead') bool? useBrackets, bool? includeNullQueryVars}) - This class represents an HTTP request that can be made with Chopper.
Properties
- baseUri → Uri
-
final
- body → dynamic
-
final
- 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?
-
final
- listFormat → ListFormat?
-
final
- 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
-
final
-
parameters
→ Map<
String, dynamic> -
final
-
parts
→ List<
PartValue> -
final
- 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 setter
- 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?
-
final
- uri → Uri
-
final
- url → Uri
-
The URL to which the request will be sent.
finalinherited
- useBrackets → bool?
-
final
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.
-
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
. -
toHttpRequest(
) → Request -
Convert this Request to a
http.Request
-
toMultipartRequest(
) → Future< MultipartRequest> -
Convert this Request to a
http.MultipartRequest
-
toStreamedRequest(
Stream< List< bodyStream) → StreamedRequestint> > -
Convert this Request to a
http.StreamedRequest
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited