A provider's API, the lowest layer of Iris: one exchange of the provider's own JSON, with its credentials, endpoints, timeouts and refusals handled. Its one method, stream, is what an implementation or a middleware writes, which send gathers.
Sends a request, giving its response's JSON: the body whole, or each event of a streamed one as it arrives. A refusal or failure of the provider's fails the stream with an ApiError.
Sends a request, giving its response's JSON: the body whole, or each event of a streamed one as it arrives. A refusal or failure of the provider's fails the stream with an ApiError.
This service, sending a request again where the provider refused or failed it for now (ApiError.RateLimited, ApiError.Overloaded, ApiError.Transient), as the configuration says, while nothing of its response has arrived. A transport failure or ApiError.TimedOut is not sent again, as a request given up on may have been answered, and charged for.
This service, sending a request again where the provider refused or failed it for now (ApiError.RateLimited, ApiError.Overloaded, ApiError.Transient), as the configuration says, while nothing of its response has arrived. A transport failure or ApiError.TimedOut is not sent again, as a request given up on may have been answered, and charged for.
Value parameters
config
The configuration, whose maxRetries, backoff and patience say how often and how long to try.
Attributes
Returns
A service trying each request until it is answered or may not be tried again.
final def send(request: ApiRequest)(using Compiler[F, F], MonadThrow[F]): F[Json]