procedure

suspend fun <P, I, R> procedure(nsid: String, params: P, paramsSerializer: KSerializer<P>, input: I, inputSerializer: KSerializer<I>, responseSerializer: KSerializer<R>, encoding: String = ContentType.Application.Json.toString(), errorMapper: XrpcErrorMapper = DefaultXrpcErrorMapper, auth: AuthProvider? = null, proxy: String? = null): R


suspend fun <P, R> procedure(nsid: String, params: P, paramsSerializer: KSerializer<P>, responseSerializer: KSerializer<R>, errorMapper: XrpcErrorMapper = DefaultXrpcErrorMapper, auth: AuthProvider? = null, proxy: String? = null): R

Overload for procedures with no input body (e.g. deleteSession).


suspend fun <P, R> procedure(nsid: String, params: P, paramsSerializer: KSerializer<P>, input: ByteArray, inputContentType: ContentType, responseSerializer: KSerializer<R>, errorMapper: XrpcErrorMapper = DefaultXrpcErrorMapper, auth: AuthProvider? = null, proxy: String? = null): R

Overload for procedures whose lexicon declares a non-JSON input.encoding (e.g. image/jpeg, video/mp4, or the wildcard &#42;/&#42; used by com.atproto.repo.uploadBlob). The bytes are posted verbatim with the supplied inputContentType. Auth, DPoP, 401 retry, and error mapping behave identically to the JSON-body overload.

The full body is held in memory; for very large uploads (e.g. video) a future ByteReadChannel overload may be added.