Table of Contents

Class WebRequestOptions

Namespace
Datafication.Connectors.WebConnector.Configuration
Assembly
Datafication.WebConnector.dll

Shared HTTP request options for all web connectors.

public class WebRequestOptions
Inheritance
object
WebRequestOptions

Properties

Accept

Gets or sets the Accept header value.

public string Accept { get; set; }

Property Value

string

Remarks

Defaults to accepting HTML and common web formats.

AcceptLanguage

Gets or sets the Accept-Language header value.

public string? AcceptLanguage { get; set; }

Property Value

string

Cookies

Gets or sets cookies to include in the request.

public Dictionary<string, string> Cookies { get; set; }

Property Value

Dictionary<string, string>

Remarks

Cookies are sent as a Cookie header in the format "name1=value1; name2=value2". Use this for session cookies or authentication cookies.

FollowRedirects

Gets or sets whether to follow HTTP redirects.

public bool FollowRedirects { get; set; }

Property Value

bool

Remarks

When set to true (default), the connector will automatically follow HTTP 301, 302, 307, and 308 redirects up to MaxRedirects times.

Headers

Gets or sets custom HTTP headers to include in requests.

public Dictionary<string, string> Headers { get; set; }

Property Value

Dictionary<string, string>

Remarks

Use this to add authentication tokens, API keys, or other custom headers. Headers like User-Agent and Cookie are set separately via their dedicated properties.

MaxRedirects

Gets or sets the maximum number of redirects to follow.

public int MaxRedirects { get; set; }

Property Value

int

Remarks

Only applies when FollowRedirects is true. Default is 10.

TimeoutSeconds

Gets or sets the request timeout in seconds.

public int TimeoutSeconds { get; set; }

Property Value

int

Remarks

The default timeout is 30 seconds. Increase this value for slow-loading pages or decrease it for faster failure detection.

UserAgent

Gets or sets the User-Agent string sent with HTTP requests.

public string UserAgent { get; set; }

Property Value

string

Remarks

Defaults to a modern browser user agent string. Some websites may block requests with non-browser user agents.