@libj/http
Advanced tools
Comparing version 0.6.3 to 0.7.0
@@ -16,2 +16,3 @@ "use strict"; | ||
var axios_1 = require("axios"); | ||
var axiosRetry_1 = require("../lib/axiosRetry"); | ||
var HttpForm_1 = require("../form/HttpForm"); | ||
@@ -31,2 +32,6 @@ var src_1 = require("@libj/http-meta"); | ||
} | ||
// Configure retry logic | ||
if (config.retry) { | ||
axiosRetry_1.axiosRetry(this.agent, config.retry); | ||
} | ||
} | ||
@@ -88,2 +93,6 @@ /*** Public ***/ | ||
} | ||
if (options.retry) { | ||
options['axios-retry'] = __assign({}, options.retry); | ||
delete options.retry; | ||
} | ||
return options; | ||
@@ -90,0 +99,0 @@ }; |
import { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
import { IAxiosRetryConfig } from 'axios-retry'; | ||
import { LooseObject } from '../common/types'; | ||
import { LoggerInterface } from '@libj/logger'; | ||
export declare type HttpRetryConfig = IAxiosRetryConfig; | ||
export interface HttpRequestOptions extends AxiosRequestConfig { | ||
method?: any; | ||
cookies?: LooseObject; | ||
retry?: HttpRetryConfig; | ||
} | ||
@@ -8,0 +11,0 @@ export interface GetRequestOptions extends HttpRequestOptions { |
import { LoggerInterface } from '@libj/logger'; | ||
import { HttpClient } from './client/HttpClient'; | ||
import { HttpClientConfig, HttpHeaders, HttpRequestOptions, HttpResponse, HttpSubmitArgs, HttpClientLoggerSetting } from './client/types'; | ||
import { HttpClientConfig, HttpHeaders, HttpRequestOptions, HttpResponse, HttpSubmitArgs, HttpClientLoggerSetting, HttpRetryConfig } from './client/types'; | ||
import { HttpForm } from './form/HttpForm'; | ||
export { HttpClient, HttpRequestOptions, HttpClientConfig, HttpHeaders, HttpResponse, HttpSubmitArgs, HttpClientLoggerSetting, LoggerInterface, }; | ||
export { HttpClient, HttpRequestOptions, HttpClientConfig, HttpHeaders, HttpResponse, HttpSubmitArgs, HttpClientLoggerSetting, LoggerInterface, HttpRetryConfig, }; | ||
export { HttpForm }; |
{ | ||
"dependencies": { | ||
"@libj/http-meta": "0.1.22", | ||
"@libj/logger": "0.2.1", | ||
"@libj/http-meta": "0.1.23", | ||
"@libj/logger": "0.2.2", | ||
"@libj/make-uri": "1.1.15", | ||
"axios": "^0.21.1", | ||
"axios-retry": "^3.2.5", | ||
"form-data": "^4.0.0", | ||
@@ -11,3 +12,3 @@ "fs-extra": "^8.1.0" | ||
"name": "@libj/http", | ||
"version": "0.6.3", | ||
"version": "0.7.0", | ||
"description": "Http toolbox", | ||
@@ -36,3 +37,3 @@ "author": "Sergey Poskachey <seregynp@gmail.com>", | ||
], | ||
"gitHead": "fbc6d56bf85456786cff100e68d166238d2ffb6a" | ||
"gitHead": "ae203452a0377a3d2b7a3638d8c4ff8951de7565" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
23786
32
324
7
+ Addedaxios-retry@^3.2.5
+ Added@babel/runtime@7.26.0(transitive)
+ Added@libj/http-meta@0.1.23(transitive)
+ Added@libj/logger@0.2.2(transitive)
+ Addedaxios-retry@3.9.1(transitive)
+ Addedis-retry-allowed@2.2.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@libj/http-meta@0.1.22(transitive)
- Removed@libj/logger@0.2.1(transitive)
Updated@libj/http-meta@0.1.23
Updated@libj/logger@0.2.2