Modifier

Partager via


HttpClient.DefaultRequestHeaders() Method

Version: Available or changed with runtime version 1.0.

Gets the default request headers which should be sent with each request.

Syntax

CurrentDefaultRequestHeaders :=   HttpClient.DefaultRequestHeaders()

Note

This method can be invoked using property access syntax.

Parameters

HttpClient
 Type: HttpClient
An instance of the HttpClient data type.

Return Value

CurrentDefaultRequestHeaders
 Type: HttpHeaders
The default request headers which should be sent with each request.

Remarks

The HttpHeaders variable is a reference type. When you add a header to this variable, the default headers are changed. You cannot set another HttpHeaders object as a default header, you have to update the header fetched from HttpClient.

HttpClient Data Type
Get Started with AL
Developing Extensions