Class KeyCredentialPolicy

java.lang.Object
com.azure.core.http.policy.KeyCredentialPolicy
All Implemented Interfaces:
HttpPipelinePolicy
Direct Known Subclasses:
AzureKeyCredentialPolicy

public class KeyCredentialPolicy extends Object implements HttpPipelinePolicy
Pipeline policy that uses an KeyCredential to set the authorization key for a request.

Requests sent with this pipeline policy are required to use HTTPS. If the request isn't using HTTPS an exception will be thrown to prevent leaking the key.