Class RequestExtensions (1.55.0)

public static class RequestExtensions

Extension methods for requests.

Inheritance

Object > RequestExtensions

Namespace

Google.Apis.Auth.OAuth2

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
NameDescription
requestT

The request which requires a credential. Must not be null.

credentialICredential

The credential to use for this request only. Must not be null.

Returns
TypeDescription
T
Type Parameter
NameDescription
T

The request type.