1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public static class RequestExtensions

Extension methods for requests.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RequestExtensions

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apis.Auth.OAuth2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Auth.OAuth2.md.txt)

## Assembly

Google.Apis.Auth.dll

## Methods

### AddCredential\<T\>(T, ICredential)

    public static T AddCredential<T>(this T request, ICredential credential) where T : ClientServiceRequest

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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `T` The request which requires a credential. Must not be null. |
| `credential` | `ICredential` The credential to use for this request only. Must not be null. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `T` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `T` | The request type. |