Class HomeserverDiscovery
Client server discovery via well-known URI.
Inherited Members
Namespace: Uniform.Matrix.Protocol.Client
Assembly: Uniform.Matrix.Protocol.Client.dll
Syntax
public static class HomeserverDiscovery
Methods
| Edit this page View SourceDiscoverAsync(HttpClient, string, CancellationToken)
Resolve the homeserver base URL for serverName; falls back to https://{serverName}/ when no well-known file exists.
Declaration
public static Task<Uri> DiscoverAsync(HttpClient http, string serverName, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpClient | http | Client used for the well-known request. |
| string | serverName | Server part of a user ID, e.g. |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Uri> |
Examples
Uri homeserver = await HomeserverDiscovery.DiscoverAsync(http, "matrix.org");