HttpClientConfiguration class

Configuration for HttpClient.

Remarks

The HttpClientConfiguration object provides a set of switches for enabling/disabling various features of the HttpClient class. Normally these switches are set (e.g. when calling HttpClient.fetch()) by providing one of the predefined defaults from HttpClientConfigurations, however switches can also be changed via the HttpClientConfiguration.overrideWith() method.

Constructors

(constructor)(flags, overrideFlags)

Constructs a new instance of HttpClientConfiguration with the specified flags. The default values will be used for any flags that are missing or undefined. If overrideFlags is specified, it takes precedence over flags.

Properties

flags

Methods

initializeFlags()

Child classes should override this method to initialize the flags object.

overrideWith(sourceFlags)

Child classes should override this method to construct the child class type, rather than the base class type.

Constructor Details

(constructor)(flags, overrideFlags)

Constructs a new instance of HttpClientConfiguration with the specified flags. The default values will be used for any flags that are missing or undefined. If overrideFlags is specified, it takes precedence over flags.

constructor(flags: IHttpClientConfiguration, overrideFlags?: IHttpClientConfiguration);

Parameters

overrideFlags
IHttpClientConfiguration

Property Details

flags

protected flags: IHttpClientConfiguration;

Property Value

Method Details

initializeFlags()

Child classes should override this method to initialize the flags object.

/** @virtual */
protected initializeFlags(): void;

Returns

void

overrideWith(sourceFlags)

Child classes should override this method to construct the child class type, rather than the base class type.

/** @virtual */
overrideWith(sourceFlags: IHttpClientConfiguration): HttpClientConfiguration;

Parameters

Returns

@microsoft/sp-http!default:class