SendNetworkRequestUseCase

Sends a general-purpose HTTP request and returns the raw response — backs SendNetworkRequest, the general-purpose way to talk to a backend from inside an event chain. Reachable via get<SendNetworkRequestUseCase>().

Constructors

Link copied to clipboard
constructor(repository: MosaicRepository)

Types

Link copied to clipboard
data class Params(val url: String, val headers: Map<String, String>? = null, val body: Any?, val httpMethod: HttpMethod, val timeoutMillis: Long? = null)

Functions

Link copied to clipboard
open suspend override fun execute(params: SendNetworkRequestUseCase.Params): Result<HttpResponse>
Link copied to clipboard
suspend operator fun invoke(params: SendNetworkRequestUseCase.Params): Result<HttpResponse>