<PackageReference Include="Refit" Version="15.0.0" />

Refit.ISynchronousContentSerializer

An optional capability for an IHttpContentSerializer that can serialize a request body synchronously (buffered or streamed). Refit uses this when RequestBodySerialization is Buffered or Streamed, allowing the System.Text.Json source-generated fast-path to engage. The fast-path runs through the synchronous serialization primitives (SerializeToUtf8Bytes / Serialize(Utf8JsonWriter, ...)); the built-in SerializeAsync(Stream) used by JsonContent bypasses it and uses the metadata logic instead.

Serializes item synchronously into a buffered HttpContent.

Creates an HttpContent that serializes item through the synchronous fast-path onto the request stream, flushing asynchronously, without buffering the whole body. Best for large uploads.