DynamiteClient constructor

DynamiteClient(
  1. Uri baseURL, {
  2. Client? httpClient,
  3. 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.');
  }
}