Path: redb-route/redb.Route/Serialization/FormUrlEncodedOptions.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route/Serialization/FormUrlEncodedOptions.cs
----
using System.Text;
namespace redb.Route.Serialization;
///
/// Options of . The limits apply wherever the form comes from (HTTP, a file,
/// a queue), not only behind a web server; the defaults are those of ASP.NET Core's FormOptions.
///
public sealed class FormUrlEncodedOptions
{
///
/// Character encoding of the decoded bytes. Default UTF-8, what browsers send from a UTF-8 page; the
/// charset parameter is not part of this content type, so a sender with another encoding needs its own
/// format instance.
///
public Encoding Encoding { get; set; } = Encoding.UTF8;
/// Most fields one form may have. Default 1024.
public int MaxFields { get; set; } = 1024;
/// Longest field name, in characters after decoding. Default 2048.
public int MaxNameLength { get; set; } = 2048;
/// Longest field value, in characters after decoding. Default 4 194 304 (4 M).
public int MaxValueLength { get; set; } = 4 * 1024 * 1024;
}