Class ProtoHttpEndpoint
Shared resolution of the base address an HTTP-based client sends to.
public static class ProtoHttpEndpoint
- Inheritance
-
ProtoHttpEndpoint
- Inherited Members
Methods
RequireHttpAddress(Uri, string)
Validates that an address is an absolute HTTP or HTTPS URI and returns it, so every HTTP-based
protocol enforces the same rule with the same wording. description names what
was validated, for example A REST base address.
public static Uri RequireHttpAddress(Uri address, string description)
Parameters
Returns
ResolveBaseAddressAsync(HttpClient, string, string, Func<ProtoExecutionContext, CancellationToken, ValueTask<Uri>>?, ProtoExecutionContext, CancellationToken)
Resolves the client's base address, from the per-test resolver when there is one and from the client otherwise, and validates that it is an absolute HTTP or HTTPS address.
public static ValueTask<Uri> ResolveBaseAddressAsync(HttpClient client, string protocolName, string targetName, Func<ProtoExecutionContext, CancellationToken, ValueTask<Uri>>? resolver, ProtoExecutionContext context, CancellationToken cancellationToken)
Parameters
clientHttpClientprotocolNamestringtargetNamestringresolverFunc<ProtoExecutionContext, CancellationToken, ValueTask<Uri>>contextProtoExecutionContextcancellationTokenCancellationToken