Created
March 21, 2022 06:43
-
-
Save dev4jam/dec1a80dfded95f98c80c2fd7aef7c8c to your computer and use it in GitHub Desktop.
Network request
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum NetworkRequestType { GET, POST, PUT, PATCH, DELETE } | |
class NetworkRequest { | |
const NetworkRequest({ | |
required this.type, | |
required this.path, | |
required this.data, | |
this.queryParams, | |
this.headers, | |
}); | |
final NetworkRequestType type; | |
final String path; | |
final NetworkRequestBody data; | |
final Map<String, dynamic>? queryParams; | |
final Map<String, String>? headers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment