@orion-js/echoes
Advanced tools
Comparing version 3.5.0 to 3.5.3
@@ -22,2 +22,4 @@ "use strict"; | ||
url: (0, getURL_1.default)(service), | ||
retries: options.retries, | ||
timeout: options.timeout, | ||
data: { | ||
@@ -24,0 +26,0 @@ body, |
@@ -8,11 +8,15 @@ "use strict"; | ||
const axios_1 = __importDefault(require("axios")); | ||
const helpers_1 = require("@orion-js/helpers"); | ||
const makeRequest = async (options) => { | ||
const result = await (0, axios_1.default)({ | ||
method: 'post', | ||
url: options.url, | ||
headers: { | ||
'User-Agent': 'Orionjs-Echoes/1.1' | ||
}, | ||
data: options.data | ||
}); | ||
const result = await (0, helpers_1.executeWithRetries)(async () => { | ||
return await (0, axios_1.default)({ | ||
method: 'post', | ||
url: options.url, | ||
timeout: options.timeout, | ||
headers: { | ||
'User-Agent': 'Orionjs-Echoes/1.1' | ||
}, | ||
data: options.data | ||
}); | ||
}, options.retries, 200); | ||
return { | ||
@@ -19,0 +23,0 @@ data: result.data, |
@@ -20,2 +20,4 @@ import { ConsumerConfig, KafkaConfig, ProducerConfig, Consumer, Producer, EachMessagePayload } from 'kafkajs'; | ||
params: TParams; | ||
retries?: number; | ||
timeout?: number; | ||
} | ||
@@ -28,2 +30,4 @@ export interface RequestHandlerResponse { | ||
url: string; | ||
retries?: number; | ||
timeout?: number; | ||
data: { | ||
@@ -30,0 +34,0 @@ body: object; |
{ | ||
"name": "@orion-js/echoes", | ||
"version": "3.5.0", | ||
"version": "3.5.3", | ||
"main": "lib/index.js", | ||
@@ -21,5 +21,5 @@ "types": "lib/index.d.ts", | ||
"@orion-js/env": "^3.5.0", | ||
"@orion-js/helpers": "^3.5.0", | ||
"@orion-js/http": "^3.5.0", | ||
"@orion-js/services": "^3.5.0", | ||
"@orion-js/helpers": "^3.5.3", | ||
"@orion-js/http": "^3.5.3", | ||
"@orion-js/services": "^3.5.3", | ||
"axios": "^0.24.0", | ||
@@ -44,3 +44,3 @@ "jssha": "^3.2.0", | ||
}, | ||
"gitHead": "6fc8b0e40fad04d7ff84cf0849cbf260a66b6641" | ||
"gitHead": "34430096bb765afdc07b6f3c079915d424491b9c" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26704
655
Updated@orion-js/helpers@^3.5.3
Updated@orion-js/http@^3.5.3
Updated@orion-js/services@^3.5.3