SignalServerJSONClient constructor

SignalServerJSONClient(
  1. String baseUrl,
  2. String prefix, {
  3. ClientHooks? hooks,
  4. Interceptor? interceptor,
})

Implementation

SignalServerJSONClient(this.baseUrl, this.prefix,
    {twirp.ClientHooks? hooks, twirp.Interceptor? interceptor}) {
  if (!baseUrl.endsWith('/')) baseUrl += '/';
  if (!prefix.endsWith('/')) prefix += '/';
  if (prefix.startsWith('/')) prefix = prefix.substring(1);

  this.hooks = hooks ?? twirp.ClientHooks();
  this.interceptor = interceptor ?? twirp.chainInterceptor([]);
}