You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refit encodes URL [Query] and path segment values automatically, and the only controls are method-level ([QueryUriFormat]) or coarse (TreatAsString). There's no per-parameter way to say "this value is already encoded, pass it through verbatim." This is the feature side of bug #2002 (URL segments getting encoded with no toggle).
Prior art: Retrofit encoded
Retrofit puts an encoded flag on individual parameter annotations — @Query(value, encoded=true), @Path(value, encoded=true), @Field(..., encoded=true), @QueryMap(encoded=true). When set, Retrofit skips URL-encoding for that parameter, letting callers pass pre-encoded values.
Proposal
Add a per-parameter encoding opt-out, e.g. an Encode = false property on [Query] (and a path equivalent), so a single value can bypass automatic encoding while the rest of the request encodes normally. Resolves #2002.
Considerations
Interaction with UrlResolutionMode (RefitLegacy vs Rfc3986) and QueryUriFormatAttribute — define precedence (per-param should win).
Type-safe REST API clients for .NET, generated from annotated interfaces with build-time source generation, direct request construction, System.Text.Json defaults, and support for trimming and AOT.
Activity
feat!: reflection-free source-generated request building (#2210)
glennawatson commentedon Jul 15, 2026
This is addressed in the Refit 14 beta, now available on NuGet: https://www.nuget.org/packages/Refit/14.0.0-beta.1
Please give it a try - feedback ahead of the stable 14.0.0 release is very welcome.
github-actions commentedon Jul 30, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.