This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
//const host = 'http://api.valantis.store:40000/'; | |
const host = 'https://api.valantis.store:41000/'; | |
const password = 'Valantis'; | |
const stamp = new Date().toISOString().slice(0, 10).replace(/-/g, ""); | |
const hash = CryptoJS.MD5(`${password}_${stamp}`); | |
let config = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IApiClient | |
{ | |
Task<T> Call<T>(string uri, object request, CancellationToken cancellationToken); | |
Task<string> GetToken(); | |
} | |
public class ApiClient: IApiClient | |
{ | |
protected ApiClient() | |
{ | |
Client = new HttpClient(); |