@quantos/micro-request
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -7,3 +7,3 @@ import { Entity } from './interfaces/entity'; | ||
declare function getMany<Y, T extends Entity<Y>>(options: MicroRequestGetManyOptions<Y, T>): Promise<T[]>; | ||
declare function get(options: MicroRequestGetOptions): Promise<any>; | ||
declare function get<T>(options: MicroRequestGetOptions): Promise<T>; | ||
declare const MicroRequest: { | ||
@@ -10,0 +10,0 @@ getOne: typeof getOne; |
{ | ||
"name": "@quantos/micro-request", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Quantos http client with cache, retry and fallback mechanism", | ||
@@ -5,0 +5,0 @@ "author": "fabriziotognetto <info@quantos.it>", |
@@ -92,3 +92,3 @@ import { fallbackErrorHandler } from './fallback_error_handler'; | ||
async function get(options: MicroRequestGetOptions): Promise<any> { | ||
async function get<T>(options: MicroRequestGetOptions): Promise<T> { | ||
@@ -104,3 +104,3 @@ options = { | ||
if (options.cache) { | ||
const cached = await RedisCache.get(_url, _cachePrefix); | ||
const cached = await RedisCache.get<T>(_url, _cachePrefix); | ||
if (cached) { | ||
@@ -107,0 +107,0 @@ console.log('[@quantos/micro-request][Cache] retrieved ' + _url); |
Sorry, the diff of this file is not supported yet
37434