예제 #1
0
        private static async Task <string> GetToken()
        {
            using var identityApi = new CopyleaksIdentityApi();
            var response = await identityApi.LoginAsync(Constants.CopyLeaksEmail, Constants.CopyLeaksKey);

            var token = response.Token;

            return(token);
        }
        static CopyleaksSDKHttpClients()
        {
            HttpClientHandler handler = new HttpClientHandler()
            {
                AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
            };

            _HttpClient     = new HttpClient(handler);
            _IdentityClient = new CopyleaksIdentityApi(_HttpClient);
            _APIClient      = new CopyleaksScansApi(_HttpClient);
        }
        public SubmitFileTest()
        {
            HttpClientHandler handler = new HttpClientHandler()
            {
                AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
            };

            Client         = new HttpClient(handler);
            IdentityClient = new CopyleaksIdentityApi(Client);
            APIClient      = new CopyleaksScansApi(Client);
        }