DynamiteClient constructor
DynamiteClient(
- Uri baseURL, {
- Client? httpClient,
- List<
DynamiteAuthentication> ? authentications,
Creates a new dynamite network client.
If httpClient
is not provided a default one will be created.
The baseURL
will be normalized, removing any trailing /
.
It is an error if the baseURL
contains any query parameters.
Implementation
DynamiteClient(
Uri baseURL, {
http.Client? httpClient,
this.authentications,
}) : httpClient = httpClient ?? http.Client(),
baseURL = baseURL.normalizeEmptyPath() {
if (baseURL.queryParametersAll.isNotEmpty) {
throw ArgumentError.value(baseURL, 'baseURL', 'MUST NOT contain query parameters.');
}
}