ApiClient constructor

ApiClient({
  1. required ApiClientTransport transport,
  2. String basePath = "https://localhost:8080",
  3. String? defaultAuthName = kBearer,
  4. ApiReader? serializer,
  5. Map<String, String>? basePaths,
  6. Authentication? authentication,
})

Implementation

ApiClient(
    {required this.transport,
    this.basePath = "https://localhost:8080",
    this.defaultAuthName = kBearer,
    this.serializer,
    Map<String, String>? basePaths,
    Authentication? authentication})
    : basePaths = basePaths ?? {} {
  // Setup authentications (key: authentication name, value: authentication).
  authentications['Bearer'] =
      authentication ?? ApiKeyAuth("header", "Authorization");
}