Category : httpclient

I have researched and found possible solutions but none worked for Windows Service. The Code is this (and it works on a CLI app) private HttpClient HttpClientAddCertificate(string issuer) { var store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); var certs = store.Certificates.Find(X509FindType.FindByIssuerDistinguishedName, issuer, false); X509Certificate2 cert = certs.Count > 0 ? certs[0] : null; if ..

Read more

I have been trying a way to add the Http Version as 1.0 in Powershell to my HttpClient Object. function Post-JSONData { Param ( [Parameter(Mandatory=$True)] [String] $JSONPayload, [Parameter(Mandatory=$True)] [String] $ObjectClass, [Parameter(Mandatory=$True)] [String] $APIUrl, [Parameter(Mandatory=$False)] [String] $ProxyUrl ) #Try{ If($JSONPayload.StartsWith("[") -eq $false -and $JSONPayload.EndsWith("]") -eq $false) { $JSONPayload = "[" + $JSONPayload + "]" } [System.Net.ServicePointManager]::SecurityProtocol ..

Read more

ive been getting this error: Starting build… Build finished with error: undefined reference to `mg_send’ undefined reference to `mbuf_remove’ undefined reference to `mg_mgr_init’ undefined reference to `mg_bind’ undefined reference to `mg_mgr_poll’ collect2.exe: error: ld returned 1 exit status The terminal process terminatedwith exit code: -1. I just did a little HTTP Client with the API ..

Read more

I’m trying to run a simple example with http_client, using CppRestSDK 2.10 (Casablanca) but on trying to create the http_client instance, it crashes with the exception in the attached image. The line of code that triggers the exception is – http_client client(U("https://jsonplaceholder.typicode.com/photos")); That’s the first line in main() CppRestSDK was installed using vcpkg install cpprestsdk:x64-windows ..

Read more