StatusCodeConfig constructor

const StatusCodeConfig({
  1. Set<int> successCodes = const {200, 201, 202, 204},
  2. Set<int> errorCodes = const {400, 401, 402, 403, 404, 405, 408, 409, 410, 422, 429, 500, 501, 502, 503, 504},
  3. Set<int> redirectCodes = const {301, 302, 303, 304, 307, 308},
  4. Set<int> clientErrorCodes = const {400, 401, 402, 403, 404, 405, 408, 409, 410, 422, 429},
  5. Set<int> serverErrorCodes = const {500, 501, 502, 503, 504},
})

Default configuration following standard HTTP

Implementation

const StatusCodeConfig({
  this.successCodes = const {200, 201, 202, 204},
  this.errorCodes = const {
    400,
    401,
    402,
    403,
    404,
    405,
    408,
    409,
    410,
    422,
    429,
    500,
    501,
    502,
    503,
    504,
  },
  this.redirectCodes = const {301, 302, 303, 304, 307, 308},
  this.clientErrorCodes = const {
    400,
    401,
    402,
    403,
    404,
    405,
    408,
    409,
    410,
    422,
    429,
  },
  this.serverErrorCodes = const {500, 501, 502, 503, 504},
});