When http_listener is https://localhost:someport throws exception error from the Client

Jun 3, 2015 at 11:55 PM
Edited Jun 4, 2015 at 12:00 AM
Hi i searched earlier and show that the https listener supports windows https which is enough.

And after completing my own version of the server and client, i wanted to test it out with the localhost but when i change it to https://localhost:34568 the server runs fine but the client throw an exception error with the abort option.

http_response response = client.request(methods::GET, buf.str()).get(); <- This is where the error is thrown when i am using https instead of http
Jun 3, 2015 at 11:59 PM
Hi NeroV,

Yes any errors from the HTTP request will come out of the task returned from the http_client::request(...) method. The exception type should be web::http::http_exception, can you try catching it an examining the error message and error code for more information?

Jun 4, 2015 at 12:11 AM
hi, Steve i tried catching it using the type web::http::http_exception it throws this message

WinHttpSendRequest: 12030: The connection with the server was terminated abnormally.
Jun 5, 2015 at 8:48 PM
Hi NeroV,

It sounds like the http_client is unable to reach your http_listener, unfortunately the error message isn't great from the OS. I'd recommend trying to use something like Fiddler to see if you can make an HTTP reaching the server.