Skip to content

Instantly share code, notes, and snippets.

@dev4jam
Created March 21, 2022 06:43
Show Gist options
  • Save dev4jam/dec1a80dfded95f98c80c2fd7aef7c8c to your computer and use it in GitHub Desktop.
Save dev4jam/dec1a80dfded95f98c80c2fd7aef7c8c to your computer and use it in GitHub Desktop.
Network request
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