<PackageReference Include="System.Text.Encodings.Web" Version="9.0.5" />

UrlEncoder

public abstract class UrlEncoder : TextEncoder
Represents a URL character encoding.
public static UrlEncoder Default { get; }

Gets a built-in instance of the UrlEncoder class.

protected UrlEncoder()

Initializes a new instance of the UrlEncoder class.

public static UrlEncoder Create(TextEncoderSettings settings)

Creates a new instance of UrlEncoder class with the specified settings.

public static UrlEncoder Create(UnicodeRange[] allowedRanges)

Creates a new instance of the UrlEncoder class that specifies characters the encoder is allowed to not encode.