class Zap::Utils::Fetch(T)

Included Modules

Defined in:

utils/fetch/cache.cr
utils/fetch/fetch.cr

Constant Summary

CACHE_DIR = ".fetch_cache"
Log = Zap::Log.for(self)

Constructors

Instance Method Summary

Instance methods inherited from module Zap::Utils::Concurrent::DedupeLock(T)

dedupe(key : String, &block : -> T) : T dedupe

Instance methods inherited from class Object

or(other : T) : T | self forall T or, pipe(&) pipe

Constructor Detail

def self.new(base_url : String, pool_max_size : Int32 = 20, cache : Cache(T) = Cache::InMemory(T).new, &block : HTTP::Client -> ) #

[View source]
def self.new(base_url, max_clients = 20) #

[View source]

Instance Method Detail

def base_url : String #

[View source]
def client(retry_attempts = 3, &) #

[View source]
def close #

[View source]
def fetch_with_cache(*args, **kwargs, &transform_body : String -> T) : T #

[View source]
def fetch_with_cache(*args, **kwargs) : T #

[View source]