Class RequestExtensions
Extension methods for requests.
Inherited Members
Namespace: Google.Apis.Auth.OAuth2
Assembly: Google.Apis.Auth.dll
Syntax
public static class RequestExtensions
Methods
AddCredential<T>(T, ICredential)
Add a credential that is used for this request only. This will override a service-level credential (if there is one). Do not call more than once per request instance, as each call incrementally adds the provided credential. To perform identical requests but with distinct credentials, create a separate request instance for each credential.
Declaration
public static T AddCredential<T>(this T request, ICredential credential) where T : ClientServiceRequest
Parameters
Type | Name | Description |
---|---|---|
T | request | The request which requires a credential. Must not be null. |
ICredential | credential | The credential to use for this request only. Must not be null. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The request type. |