ApiAuthorization.apiKeyHeader constructor

const ApiAuthorization.apiKeyHeader({
  1. required String name,
  2. required String value,
})

Injects the API key as the named request header.

Implementation

const ApiAuthorization.apiKeyHeader({
  required String name,
  required String value,
}) : this(
        type: ApiAuthorizationType.apiKey,
        apiKeyName: name,
        apiKeyValue: value,
        apiKeyPlacement: ApiKeyPlacement.header,
      );