class Zap::Utils::Fetch(T)
- Zap::Utils::Fetch(T)
- Reference
- Object
Included Modules
Defined in:
utils/fetch/cache.crutils/fetch/fetch.cr
Constant Summary
-
CACHE_DIR =
".fetch_cache"
-
Log =
Zap::Log.for(self)
Constructors
- .new(base_url : String, pool_max_size : Int32 = 20, cache : Cache(T) = Cache::InMemory(T).new, &block : HTTP::Client -> )
- .new(base_url, max_clients = 20)
Instance Method Summary
- #base_url : String
- #client(retry_attempts = 3, &)
- #close
- #fetch_with_cache(*args, **kwargs, &transform_body : String -> T) : T
- #fetch_with_cache(*args, **kwargs) : T
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 -> )
#