PostRequest<T> constructor

PostRequest<T>({
  1. required String url,
  2. required T fromJson(
    1. Map<String, dynamic>
    ),
  3. required Map<String, dynamic> body,
  4. Map<String, String> headers = const {'Content-Type' : 'application/json'},
  5. bool requestPrint = false,
  6. bool responsePrint = false,
  7. bool shouldPrintErrors = false,
  8. bool shouldPrintStackTrace = false,
  9. 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,
});