withUrl method

HubConnectionBuilder withUrl (String url, { HttpConnectionOptions options, HttpTransportType transportTyp })

Configures the {@link @aspnet/signalr.HubConnection} to use HTTP-based transports to connect to the specified URL.

url: The URL the connection will use. options: An options object used to configure the connection. transportType: The requested (and supported) transportedType. Use either options or transportType. Returns the builder instance, for chaining.

Implementation

HubConnectionBuilder withUrl(String url,
    {HttpConnectionOptions options, HttpTransportType transportTyp}) {
  assert(!isStringEmpty(url));
  assert(!(options != null && transportTyp != null));

  _url = url;

  if (options != null) {
    _httpConnectionOptions = options;
  } else {
    _httpConnectionOptions = HttpConnectionOptions(transport: transportTyp);
  }

  return this;
}