This file contains hidden or 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
| # Add type to handle the API certificate | |
| add-type @" | |
| using System.Net; | |
| using System.Security.Cryptography.X509Certificates; | |
| public class ITrustACertificatePolicy : ICertificatePolicy { | |
| public ITrustACertificatePolicy() {} | |
| public bool CheckValidationResult( | |
| ServicePoint sPoint, X509Certificate cert, | |
| WebRequest wRequest, int certProb) { |
This file contains hidden or 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
| namespace ConsoleAPIClient | |
| { | |
| using System; | |
| using System.Net; | |
| using System.Net.Http; | |
| using System.Security.Cryptography.X509Certificates; | |
| class Program | |
| { | |
| private const string SITES_ENDPOINT = "https://jimmyca-srv2.cloudapp.net:55539/api/webserver/websites"; |