HttpClient.addDefaultHeader

Adds a header to be automatically appended to each request created through this client.

If you add duplicate headers, it will add multiple copies.

You should NOT use this to add headers that can be set through other properties like userAgent, authorization, or setCookie.

class HttpClient
void
addDefaultHeader
(
string key
,
string value
)

Meta

History

Added July 12, 2023