serverUrl abstract method Null safety

Registration serverUrl(
  1. String serverUrl
)

Specifies the base URL of the server where the registration should be made. If no server base URL is provided, then the base URL defined in Configuration.baseUrl will be used.

It is assumed that all the servers have the same endpoints, thus only the scheme, hostname and port of the URL will be taken into account.

Examples of base URL resolution in registration:

Configuration base URLProvided server URL in RegistrationResulting Server URL
https://server/pathhttps://other.serverhttps://other.server/path
https://server:443/pathhttps://other.server/pathhttps://other.server/path
https://server/pathhttp://other.server:80/otherpathhttp://other.server:80/path

Params:

  • serverUrl: the server URL.

Returns: a Registration object.

Implementation

Registration serverUrl(String serverUrl);