ViaMethods<R extends ViaResult> mixin
A mixin that provides shorthand methods for common HTTP operations.
- Mixin applications
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String endpoint, Object? body, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a DELETE request.
-
get(
String endpoint, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a GET request.
-
head(
String endpoint, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a HEAD request.
-
multipart(
String endpoint, {Map< String, dynamic> ? fields, Map<String, ViaFile> ? files, ViaMethod method = .post, Map<String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a multipart request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch(
String endpoint, Object? body, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a PATCH request.
-
post(
String endpoint, Object? body, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a POST request.
-
put(
String endpoint, Object? body, {Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<R> - Performs a PUT request.
-
stream(
String endpoint, {ViaMethod method = .get, Object? body, Map< String, dynamic> ? queryParams, ViaHeaders headers = const {}, CancelToken? cancelToken, List<ViaPipeline> pipelines = const []}) → Future<ViaResultStream> - Performs a request and returns the response as a stream of bytes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited