コード例 #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);
        }
コード例 #3
0
        public SubmitFileTest()
        {
            HttpClientHandler handler = new HttpClientHandler()
            {
                AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
            };

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