🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@fiado/http-client

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fiado/http-client - npm Package Compare versions

Comparing version
1.0.6
to
1.0.7
+6
-6
bin/AxiosHttpRequest.d.ts

@@ -5,3 +5,3 @@ import { AxiosRequestConfig } from 'axios';

/**
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT_MILISECONDS
* @returns El valor de timeout en milisegundos o undefined si no está configurado

@@ -13,21 +13,21 @@ */

password: string;
}, extraConfig?: AxiosRequestConfig): Promise<T>;
}, extraConfig?: AxiosRequestConfig, enableTimeout?: boolean): Promise<T>;
post<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
put<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
patch<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
delete<T>(url: string, params?: Record<string, any>, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
private getBasicAuthHeaders;
}
export default AxiosHttpRequest;

@@ -17,3 +17,3 @@ "use strict";

/**
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT_MILISECONDS
* @returns El valor de timeout en milisegundos o undefined si no está configurado

@@ -26,5 +26,5 @@ */

}
async get(url, params = {}, headers = {}, basicAuth, extraConfig) {
async get(url, params = {}, headers = {}, basicAuth, extraConfig, enableTimeout = false) {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config = {

@@ -39,5 +39,5 @@ params,

}
async post(url, data = {}, headers = {}, basicAuth) {
async post(url, data = {}, headers = {}, basicAuth, enableTimeout = false) {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config = {

@@ -50,5 +50,5 @@ headers: { ...headers, ...authHeaders },

}
async put(url, data = {}, headers = {}, basicAuth) {
async put(url, data = {}, headers = {}, basicAuth, enableTimeout = false) {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config = {

@@ -61,5 +61,5 @@ headers: { ...headers, ...authHeaders },

}
async patch(url, data = {}, headers = {}, basicAuth) {
async patch(url, data = {}, headers = {}, basicAuth, enableTimeout = false) {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config = {

@@ -72,5 +72,5 @@ headers: { ...headers, ...authHeaders },

}
async delete(url, params = {}, headers = {}, basicAuth) {
async delete(url, params = {}, headers = {}, basicAuth, enableTimeout = false) {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config = {

@@ -77,0 +77,0 @@ params,

@@ -6,19 +6,19 @@ import { AxiosRequestConfig } from "axios";

password: string;
}, extraConfig?: AxiosRequestConfig): Promise<T>;
}, extraConfig?: AxiosRequestConfig, enableTimeout?: boolean): Promise<T>;
post<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
put<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
patch<T>(url: string, data?: any, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
delete<T>(url: string, params?: Record<string, any>, headers?: Record<string, string>, basicAuth?: {
username: string;
password: string;
}): Promise<T>;
}, enableTimeout?: boolean): Promise<T>;
}
{
"name": "@fiado/http-client",
"version": "1.0.6",
"version": "1.0.7",
"description": "Herramienta para realizar solicitudes http",

@@ -5,0 +5,0 @@ "main": "bin/index.js",

@@ -9,3 +9,3 @@ import axios, {AxiosRequestConfig} from 'axios';

/**
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT
* Obtiene el valor de timeout de la variable de entorno HTTP_CLIENT_REQUEST_TIMEOUT_MILISECONDS
* @returns El valor de timeout en milisegundos o undefined si no está configurado

@@ -22,5 +22,5 @@ */

password: string
}, extraConfig?: AxiosRequestConfig): Promise<T> {
}, extraConfig?: AxiosRequestConfig, enableTimeout: boolean = false): Promise<T> {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config: AxiosRequestConfig = {

@@ -39,5 +39,5 @@ params,

password: string
}): Promise<T> {
}, enableTimeout: boolean = false): Promise<T> {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config: AxiosRequestConfig = {

@@ -54,5 +54,5 @@ headers: {...headers, ...authHeaders},

password: string
}): Promise<T> {
}, enableTimeout: boolean = false): Promise<T> {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config: AxiosRequestConfig = {

@@ -69,5 +69,5 @@ headers: {...headers, ...authHeaders},

password: string
}): Promise<T> {
}, enableTimeout: boolean = false): Promise<T> {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config: AxiosRequestConfig = {

@@ -84,5 +84,5 @@ headers: {...headers, ...authHeaders},

password: string
}): Promise<T> {
}, enableTimeout: boolean = false): Promise<T> {
const authHeaders = basicAuth ? this.getBasicAuthHeaders(basicAuth.username, basicAuth.password) : {};
const timeout = this.getTimeoutConfig();
const timeout = enableTimeout ? this.getTimeoutConfig() : undefined;
const config: AxiosRequestConfig = {

@@ -89,0 +89,0 @@ params,

@@ -10,3 +10,4 @@ import {AxiosRequestConfig} from "axios";

basicAuth?: { username: string; password: string },
extraConfig?: AxiosRequestConfig
extraConfig?: AxiosRequestConfig,
enableTimeout?: boolean
): Promise<T>;

@@ -18,3 +19,4 @@

headers?: Record<string, string>,
basicAuth?: { username: string; password: string }
basicAuth?: { username: string; password: string },
enableTimeout?: boolean
): Promise<T>;

@@ -26,3 +28,4 @@

headers?: Record<string, string>,
basicAuth?: { username: string; password: string }
basicAuth?: { username: string; password: string },
enableTimeout?: boolean
): Promise<T>;

@@ -34,3 +37,4 @@

headers?: Record<string, string>,
basicAuth?: { username: string; password: string }
basicAuth?: { username: string; password: string },
enableTimeout?: boolean
): Promise<T>;

@@ -42,4 +46,5 @@

headers?: Record<string, string>,
basicAuth?: { username: string; password: string }
basicAuth?: { username: string; password: string },
enableTimeout?: boolean
): Promise<T>;
}