Show / Hide Table of Contents

Class RequestExtensions

Extension methods for requests.

Inheritance
object
RequestExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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.

In this article
Back to top Generated by DocFX