APIRequest<T> class
Constructors
-
APIRequest(String url, {RequestType type = RequestType.get, Map<
String, String> headers = const {}, Map<String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, String errorsField = 'errors', Encoding? encoding}) -
const
-
APIRequest.delete(String url, {Map<
String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, Map<String, String> headers = const {}, String errorsField = 'errors'}) -
factory
-
APIRequest.get(String url, {Map<
String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, Map<String, String> headers = const {}, String errorsField = 'errors'}) -
factory
-
APIRequest.patch(String url, {Map<
String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, Map<String, String> headers = const {}, String errorsField = 'errors'}) -
factory
-
APIRequest.post(String url, {Map<
String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, Map<String, String> headers = const {}, String errorsField = 'errors'}) -
factory
-
APIRequest.put(String url, {Map<
String, dynamic> ? data, List<MultipartFile> files = const [], dynamic onFilesUpload(int bytes, int totalBytes)?, bool log = false, Map<String, String> headers = const {}, String errorsField = 'errors'}) -
factory
Properties
-
data
→ Map<
String, dynamic> ? -
final
- encoding → Encoding?
-
final
- errorsField → String
-
final
-
files
→ List<
MultipartFile> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
final
- log → bool
-
final
- onFilesUpload → (dynamic Function(int bytes, int totalBytes)?)
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → RequestType
-
final
- url → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
) → Future< APIResponse< T> > -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited