Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielailie committed Aug 28, 2024
1 parent fc2503a commit 9f9e675
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/apiNetworkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ export class ApiNetworkProvider implements INetworkProvider {

constructor(url: string, config?: NetworkProviderConfig) {
this.url = url;
let proxyConfig = this.getProxyConfig(config);
this.config = { ...defaultAxiosConfig, ...config };
const proxyConfig = JSON.parse(JSON.stringify(this.config));
this.backingProxyNetworkProvider = new ProxyNetworkProvider(url, proxyConfig);
extendUserAgent(this.userAgentPrefix, this.config);
}

private getProxyConfig(config: NetworkProviderConfig | undefined) {
let proxyConfig = JSON.parse(JSON.stringify(config));
proxyConfig = { ...defaultAxiosConfig, ...proxyConfig };
return proxyConfig;
}

async getNetworkConfig(): Promise<NetworkConfig> {
return await this.backingProxyNetworkProvider.getNetworkConfig();
}
Expand Down

0 comments on commit 9f9e675

Please sign in to comment.