Documentation
Table of Contents

Constructor HttpProviderBase

Namespace
IntentSharp.Providers
Assembly
IntentSharp.dll

HttpProviderBase(HttpProviderSettings, HttpClient?, Uri, ILogger?)

Validates the settings and prepares the HTTP client.

protected HttpProviderBase(HttpProviderSettings settings, HttpClient? httpClient, Uri defaultBaseAddress, ILogger? logger)

Parameters

settings HttpProviderSettings

The API key, model, address, timeout and retry settings.

httpClient HttpClient

The client to send requests with. Null creates one that the provider owns and disposes; a supplied client is never disposed by the provider and keeps its own timeout (see Timeout).

defaultBaseAddress Uri

The service address used when neither the settings nor the client has one.

logger ILogger

Receives a Warning for every retry. Null discards them.

Exceptions

ArgumentNullException

settings is null.

ArgumentException

The settings have no API key or no model.