> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.WebApiOptions

# <a id="SuperOffice_WebApi_WebApiOptions" /> Class WebApiOptions

Namespace: [SuperOffice.WebApi](SuperOffice.WebApi.md)\
Assembly: SuperOffice.WebApi.dll

Configure the WebAPI clients with the right URL, language, timeout, and compression flags.
The language and timezones can be overridden per request.

```csharp theme={null}
public class WebApiOptions : RequestOptions
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[RequestOptions](SuperOffice.WebApi.RequestOptions.md) ←
[WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

#### Inherited Members

[RequestOptions.DefaultTimeout](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_DefaultTimeout),
[RequestOptions.LanguageCode](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_LanguageCode),
[RequestOptions.CultureCode](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_CultureCode),
[RequestOptions.Timeout](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_Timeout),
[RequestOptions.TimeZone](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_TimeZone),
[RequestOptions.TimeZoneIncludeOffset](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_TimeZoneIncludeOffset),
[RequestOptions.CustomHeaders](SuperOffice.WebApi.RequestOptions.md#SuperOffice_WebApi_RequestOptions_CustomHeaders),
[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[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.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[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)

## Constructors

### <a id="SuperOffice_WebApi_WebApiOptions__ctor" /> WebApiOptions()

Constructor

```csharp theme={null}
public WebApiOptions()
```

### <a id="SuperOffice_WebApi_WebApiOptions__ctor_System_String_" /> WebApiOptions(string)

Constructor

```csharp theme={null}
public WebApiOptions(string baseUrl)
```

#### Parameters

`baseUrl` [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_WebApiOptions__ctor_System_String_SuperOffice_WebApi_Authorization_IAuthorization_" /> WebApiOptions(string, IAuthorization)

Constructor

```csharp theme={null}
public WebApiOptions(string baseUrl, IAuthorization authorization)
```

#### Parameters

`baseUrl` [string](https://learn.microsoft.com/dotnet/api/system.string)

`authorization` IAuthorization

### <a id="SuperOffice_WebApi_WebApiOptions__ctor_System_String_SuperOffice_WebApi_Authorization_IAuthorization_Microsoft_Extensions_Logging_ILogger_System_String_System_String_System_Boolean_" /> WebApiOptions(string, IAuthorization, ILogger, string, string, bool)

Constructor

```csharp theme={null}
public WebApiOptions(string baseUrl, IAuthorization authorization, ILogger logger = null, string languageCode = null, string timeZone = null, bool verifyUrl = true)
```

#### Parameters

`baseUrl` [string](https://learn.microsoft.com/dotnet/api/system.string)

SuperOffice WebAPI base URL: "[https://example.com/Super/api/](https://example.com/Super/api/)"

`authorization` IAuthorization

Instance used to set Authorization scheme and value.

`logger` [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)

Optional logger

`languageCode` [string](https://learn.microsoft.com/dotnet/api/system.string)

ISO Language "en", "sv"

`timeZone` [string](https://learn.microsoft.com/dotnet/api/system.string)

Timezone code: "utc", "NO".

`verifyUrl` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

Determines whether base url is verified - end with /api, "[https://example.com/Super/api/](https://example.com/Super/api/)".

## Properties

### <a id="SuperOffice_WebApi_WebApiOptions_Authorization" /> Authorization

Used to set the Authorization header scheme and value.
Use <xref href="SuperOffice.WebApi.Authorization.AuthorizationUsernamePassword" data-throw-if-not-resolved="false" />, AuthorizationAccessToken,
<xref href="SuperOffice.WebApi.Authorization.AuthorizationTicket" data-throw-if-not-resolved="false" />, <xref href="SuperOffice.WebApi.Authorization.AuthorizationImplicit" data-throw-if-not-resolved="false" />
AuthorizationSystemUserTicket or <xref href="SuperOffice.WebApi.AuthorizationUserToken" data-throw-if-not-resolved="false" />.

```csharp theme={null}
public IAuthorization Authorization { get; set; }
```

#### Property Value

IAuthorization

### <a id="SuperOffice_WebApi_WebApiOptions_BaseUrl" /> BaseUrl

SuperOffice WebAPI base URL: "[https://example.com/Super/api/](https://example.com/Super/api/)"
Must be set. "/api/" suffix added if not present.

```csharp theme={null}
public string BaseUrl { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="SuperOffice_WebApi_WebApiOptions_Compressed" /> Compressed

GZip Compress request?

```csharp theme={null}
public bool Compressed { get; set; }
```

#### Property Value

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="SuperOffice_WebApi_WebApiOptions_Logger" /> Logger

Logger set via constructor.

```csharp theme={null}
public ILogger Logger { get; }
```

#### Property Value

[ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)

### <a id="SuperOffice_WebApi_WebApiOptions_ProgressListener" /> ProgressListener

Callback for progress during downloads.
Copied to the agent during initialization - can be overridden on each agent using <xref href="SuperOffice.WebApi.Agents.AgentBase.ProgressListener" data-throw-if-not-resolved="false" />.

```csharp theme={null}
public IProgressListener ProgressListener { get; set; }
```

#### Property Value

[IProgressListener](SuperOffice.WebApi.IProgressListener.md)

### <a id="SuperOffice_WebApi_WebApiOptions_UploadProgressListener" /> UploadProgressListener

Callback for progress during uploads.
Copied to the agent during initialization - can be overridden on each agent using <xref href="SuperOffice.WebApi.Agents.AgentBase.UploadProgressListener" data-throw-if-not-resolved="false" />.

```csharp theme={null}
public IProgressListener UploadProgressListener { get; set; }
```

#### Property Value

[IProgressListener](SuperOffice.WebApi.IProgressListener.md)

### <a id="SuperOffice_WebApi_WebApiOptions_UserAgent" /> UserAgent

User Agent string override.

```csharp theme={null}
public string UserAgent { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### <a id="SuperOffice_WebApi_WebApiOptions_Clone" /> Clone()

Creates a shallow copy of the current WebApiOptions.

```csharp theme={null}
public WebApiOptions Clone()
```

#### Returns

[WebApiOptions](SuperOffice.WebApi.WebApiOptions.md)

A shallow copy of the current WebApiOptions.


## Related topics

- [How to use SuperOffice.WebApi](/en/api/web-services/proxies/superoffice-webapi/index.md)
- [SuperOffice.WebApi.RequestOptions](/en/api/reference/webapi/SuperOffice.WebApi.RequestOptions.md)
- [SuperOffice.WebApi.Agents.ApiAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ApiAgent.md)
- [SuperOffice.WebApi.Agents.AIAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AIAgent.md)
- [SuperOffice.WebApi.Agents.BLOBAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.BLOBAgent.md)
- [SuperOffice.WebApi.Agents.MDOAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.MDOAgent.md)
