PostRequest<T> constructor
PostRequest<T> ({
- required String url,
- required T fromJson(),
- required Map<
String, dynamic> body, - Map<
String, String> headers = const {'Content-Type' : 'application/json'}, - bool requestPrint = false,
- bool responsePrint = false,
- bool shouldPrintErrors = false,
- bool shouldPrintStackTrace = false,
- bool expectList = false,
Implementation
PostRequest({
required this.url,
required this.fromJson,
required this.body,
this.headers = const {'Content-Type': 'application/json'},
this.requestPrint = false,
this.responsePrint = false,
this.shouldPrintErrors = false,
this.shouldPrintStackTrace = false,
this.expectList = false,
});