Example #1
0
        static void GetSecureContent(SecureApiClient client)
        {
            var url = string.Concat("http://apisec.pocs.localhost/api/test/", HttpUtility.UrlEncode("My_Friend"));

            var response = client.DownloadSecureData(url);

            Console.WriteLine(Encoding.UTF8.GetString(response));
        }
Example #2
0
        static void PostSecureContent(SecureApiClient client)
        {
            var url = "http://apisec.pocs.localhost/api/test";

            var response = client.UploadSecureData(url, new { FirstName = "Carlos", LastName = "Salvatore" });

            Console.WriteLine(Encoding.UTF8.GetString(response));
        }
Example #3
0
        static void Main(string[] args)
        {
            // CreateLogin();
            var client = new SecureApiClient(APPId, APIKey);

            client.Authenticate("http://apisec.pocs.localhost/Token", _email, _password);

            GetSecureContent(client);

            PostSecureContent(client);

            Console.ReadLine();
        }
Example #4
0
        static void CreateLogin()
        {
            var client = new SecureApiClient(APPId, APIKey);

            client.CreateLogin("http://apisec.pocs.localhost/api/Account/Register", _email, _password);
        }