# Class ClientServiceRequest (1.73.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.73.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Requests.ClientServiceRequest)
- [1.69.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.69.0/Google.Apis.Requests.ClientServiceRequest)
- [1.68.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Requests.ClientServiceRequest)
- [1.60.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Requests.ClientServiceRequest)
- [1.59.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Requests.ClientServiceRequest)
- [1.55.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Requests.ClientServiceRequest)
- [1.50.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Requests.ClientServiceRequest)

    public abstract class ClientServiceRequest

Represents an abstract request base class to make requests to a service.

## Inheritance

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

## 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)

## Derived Types

[ClientServiceRequest\<TResponse\>](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Requests.ClientServiceRequest-1)

## Namespace

[Google.Apis.Requests](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Requests)

## Assembly

Google.Apis.dll

## Fields

### _exceptionHandlers

    protected List<IHttpExceptionHandler> _exceptionHandlers

Exception handlers for this request only.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpExceptionHandler` |   |

### _executeInterceptors

    protected List<IHttpExecuteInterceptor> _executeInterceptors

Execute interceptors for this request only.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpExecuteInterceptor` |   |

### _unsuccessfulResponseHandlers

    protected List<IHttpUnsuccessfulResponseHandler> _unsuccessfulResponseHandlers

Unsuccessful response handlers for this request only.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpUnsuccessfulResponseHandler` |   |

## Properties

### Credential

    public IHttpExecuteInterceptor Credential { get; set; }

Credential to use for this request.
If [Credential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Requests.ClientServiceRequest#Google_Apis_Requests_ClientServiceRequest_Credential) implements [IHttpUnsuccessfulResponseHandler](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpUnsuccessfulResponseHandler)
then it will also be included as a handler of an unsuccessful response.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpExecuteInterceptor` |   |

## Methods

### AddExceptionHandler(IHttpExceptionHandler)

    public void AddExceptionHandler(IHttpExceptionHandler handler)

Add an exception handler for this request only.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `handler` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpExceptionHandler` The exception handler. Must not be `null`. |

### AddExecuteInterceptor(IHttpExecuteInterceptor)

    public void AddExecuteInterceptor(IHttpExecuteInterceptor handler)

Add an execute interceptor for this request only.
If the request is retried, the interceptor will be called on each attempt.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `handler` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpExecuteInterceptor` The execute interceptor. Must not be `null`. |

### AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)

    public void AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler handler)

Add an unsuccessful response handler for this request only.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `handler` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IHttpUnsuccessfulResponseHandler` The unsuccessful response handler. Must not be `null`. |

## Extension Methods

[ClientServiceRequestExtensions.Configure\<TRequest\>(TRequest, Action\<TRequest\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Requests.ClientServiceRequestExtensions#Google_Apis_Requests_ClientServiceRequestExtensions_Configure__1___0_System_Action___0__) [Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)