Method constructor

Method({
  1. String method = 'GET',
  2. dynamic uri,
  3. Map<String, String> headers = const {},
  4. Map<String, String> authHeaders = const {},
  5. List<ClientCookie> cookies = const [],
  6. List<Before> before = const [],
  7. List<After> after = const [],
  8. Map<String, dynamic> metadata = const {},
  9. BaseClient? client,
})

Implementation

Method({
  this.method = 'GET',
  dynamic? /* String | Uri | MutUri */ uri,
  Map<String, String> headers = const {},
  Map<String, String> authHeaders = const {},
  List<ClientCookie> cookies = const [],
  List<Before> before = const [],
  List<After> after = const [],
  Map<String, dynamic> metadata = const {},
  ht.BaseClient? client,
}) : getClient = client {
  if (uri != null) {
    this.uri = MutUri.from(uri);
  }

  getMetadata.addAll(metadata);
  getHeaders.addAll(headers);
  getAuthHeaders.addAll(authHeaders);
  getCookies.addAll(cookies);
  getBefore.addAll(before);
  getAfter.addAll(after);
}