@4lch4/axios-aid
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,5 +0,5 @@ | ||
import { AxiosInstance } from "axios"; | ||
import { AxiosBasicCredentials, AxiosInstance } from "axios"; | ||
declare class AxiosAid { | ||
client: AxiosInstance; | ||
constructor(baseUrl: string, headers?: Object); | ||
constructor(baseUrl: string, headers?: Object, auth?: AxiosBasicCredentials); | ||
performRequest(method: RequestMethod, endpoint: string, payload?: RequestPayload, headers?: Object): Promise<import("axios").AxiosResponse<any>>; | ||
@@ -6,0 +6,0 @@ } |
@@ -17,7 +17,8 @@ "use strict"; | ||
class AxiosAid { | ||
constructor(baseUrl, headers) { | ||
constructor(baseUrl, headers, auth) { | ||
this.client = axios_1.default.create({ | ||
baseURL: baseUrl, | ||
timeout: 60000, | ||
headers: headers | ||
headers: headers, | ||
auth: auth | ||
}); | ||
@@ -24,0 +25,0 @@ } |
{ | ||
"name": "@4lch4/axios-aid", | ||
"displayName": "AxiosAid", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "A lightweight wrapper around Axios for type data and ease of use.", | ||
@@ -32,5 +32,5 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"eslint": "^7.0.0", | ||
"typescript": "^3.9.2" | ||
"eslint": "7.0.0", | ||
"typescript": "3.9.3" | ||
} | ||
} |
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
49
3826
5