encode

inline fun <T> Body.Companion.encode(body: T, bodySerializer: SerializationStrategy<T> = serializer()): Body(source)

Deprecated

Use `bodyOf` method instead, for consistency with frontend APIs

Replace with

bodyOf(body, bodySerializer)

A serialization-aware convenience factory method that can be used to create Body instances.