VoltronHttpRequest constructor

VoltronHttpRequest({
  1. String method = 'GET',
  2. required String url,
  3. String body = '',
  4. dynamic connectTimeout = kDefaultTimeoutMs,
  5. dynamic receiveTimeout = kDefaultTimeoutMs,
  6. dynamic useCaches = true,
  7. dynamic headerMap = const {},
})

Implementation

VoltronHttpRequest({
  this.method = 'GET',
  required this.url,
  this.body = '',
  connectTimeout = kDefaultTimeoutMs,
  receiveTimeout = kDefaultTimeoutMs,
  useCaches = true,
  headerMap = const {},
}) {
  requestId = DateTime.now().millisecondsSinceEpoch.toString();
  _initUserAgent();
  addHeader(HttpHeaderReq.kUserAgent, _userAgent!);
}