EasyHttpConfig constructor

EasyHttpConfig({
  1. required String identifier,
  2. required String apiPath,
  3. dynamic headers,
  4. dynamic timeOut = 30 * 1000,
  5. dynamic validStatus = 204,
  6. dynamic followRedirect = false,
  7. dynamic includeLogger = true,
})

Model that is requested when initializing the package.

It has the basic information both for the creation of the hhtp client and to validate the maximum status code with which it can be interpreted that a request is invalid or not.

Implementation

EasyHttpConfig({
  required this.identifier,
  required this.apiPath,
  headers,
  timeOut = 30 * 1000,
  validStatus = 204,
  followRedirect = false,
  includeLogger = true,
}) : super(
        headers: headers ?? const {},
        timeOut: timeOut,
        validStatus: validStatus,
        followRedirect: followRedirect,
        includeLogger: includeLogger,
      );