Options constructor

const Options({
  1. String method = 'GET',
  2. Map<String, List<String>>? headers,
  3. Object? body,
  4. Duration connectTimeout = const Duration(seconds: 10),
  5. Duration writeTimeout = const Duration(seconds: 10),
  6. Duration readTimeout = const Duration(seconds: 10),
  7. bool followRedirects = true,
  8. int maxRedirects = 5,
  9. int retries = 3,
  10. bool persistentConnection = true,
  11. Map<String, dynamic>? extra,
})

Implementation

const Options({
  this.method = 'GET',
  this.headers,
  this.body,
  this.connectTimeout = const Duration(seconds: 10),
  this.writeTimeout = const Duration(seconds: 10),
  this.readTimeout = const Duration(seconds: 10),
  this.followRedirects = true,
  this.maxRedirects = 5,
  this.retries = 3,
  this.persistentConnection = true,
  this.extra,
});