The API provider requires performing requests no more often than 1 second. How can this limitation be implemented using Combine in my request
method?
func request<T: Codable>(components: URLComponents) -> AnyPublisher<T, Error> {
return urlSession.dataTaskPublisher(for: components.url!)
.map(.data)
.decode(type: T.self, decoder: JSONDecoder())
.receive(on: RunLoop.main)
.eraseToAnyPublisher()
}