HeadersConfig

HTTP headers config

Fields

Name Type Description
DefaultRequestHeaders Array of HttpHeader Optional. HTTP headers will be sent with all requests. Default value is an empty array

Initialization String Format

This UDT can’t be configured with a string. Initialization methiods are used instead.

Methods

Methods that help with initialization.

AddHeader

Adds or replaces a header

Syntax
AddHeader( header )
Arguments
Name Type Description
header HttpHeader Required. HTTP header
Return type

HeadersConfig

Return value

Returns the instance on which it was called

AppendHeader

Adds a new header or a value to an existing header

Syntax
AppendHeader( name, value )
Arguments
Name Type Description
name String Required. Header name
value String Required. Header value
Return type

HeadersConfig

Return value

Returns the instance on which it was called

Examples

Creating a new instance

DECLARE @headersConfig wds.HeadersConfig = '';
DECLARE @httpHeader wds.HttpHeader = 'Name: Accept; Values: text/html';
SET @headersConfig = @headersConfig.AddHeader(@httpHeader);
SET @headersConfig = @headersConfig.AppendHeader('Accept', 'application/xml');

HttpHeader

HTTP header config

Fields

Name Type Description
Name String Required. Header name
Values Array of String Required. Header values

Initialization String Format

An instance can be initialized with a string of the following format: Name: name; Values: value1, value2;

Examples

Creating a new instance initialized from a string:

DECLARE @httpHeader wds.HttpHeader = 'Name: Accept; Values: text/html, application/xml';

Please rotate your device to landscape mode

This documentation is specifically designed with a wider layout to provide a better reading experience for code examples, tables, and diagrams.
Rotating your device horizontally ensures you can see everything clearly without excessive scrolling or resizing.

Return to Web Data Source Home