mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-05 19:50:06 +00:00
chore(request-client): rename method
This commit is contained in:
@@ -55,11 +55,11 @@ export class RequestClient implements HttpClient {
|
|||||||
protected httpClient!: AxiosInstance
|
protected httpClient!: AxiosInstance
|
||||||
|
|
||||||
constructor(protected baseUrl: string, allowInsecure = false) {
|
constructor(protected baseUrl: string, allowInsecure = false) {
|
||||||
this.instantiateHttpClient(baseUrl, allowInsecure)
|
this.createHttpClient(baseUrl, allowInsecure)
|
||||||
}
|
}
|
||||||
|
|
||||||
public setConfig(baseUrl: string, allowInsecure = false) {
|
public setConfig(baseUrl: string, allowInsecure = false) {
|
||||||
this.instantiateHttpClient(baseUrl, allowInsecure)
|
this.createHttpClient(baseUrl, allowInsecure)
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCsrfToken(type: 'general' | 'file' = 'general') {
|
public getCsrfToken(type: 'general' | 'file' = 'general') {
|
||||||
@@ -507,7 +507,7 @@ export class RequestClient implements HttpClient {
|
|||||||
return responseToReturn
|
return responseToReturn
|
||||||
}
|
}
|
||||||
|
|
||||||
private instantiateHttpClient(baseUrl: string, allowInsecure = false) {
|
private createHttpClient(baseUrl: string, allowInsecure = false) {
|
||||||
const https = require('https')
|
const https = require('https')
|
||||||
if (allowInsecure && https.Agent) {
|
if (allowInsecure && https.Agent) {
|
||||||
this.httpClient = axios.create({
|
this.httpClient = axios.create({
|
||||||
|
|||||||
Reference in New Issue
Block a user