digitalmars.D - curl
- Manu (8/8) Nov 11 2013 auto response = std.net.curl.get("http://website.com/api/blah");
- Tavi Cacina (13/18) Nov 11 2013 https://d.puremagic.com/issues/show_bug.cgi?id=9737
- Manu (7/25) Nov 11 2013 Okay, I have something working.
auto response = std.net.curl.get("http://website.com/api/blah"); I'm getting this: First-chance exception: std.net.curl.CurlException Peer certificate cannot be authenticated with given CA certificates on handle 8C5090 at std\net\curl.d(3504) Even on non-SSL connections. Am I being redirected? And why does curl crash when it encounters HTTPS anyway? Surely it should be ideal if it 'just worked'?
Nov 11 2013
On Monday, 11 November 2013 at 09:53:38 UTC, Manu wrote:First-chance exception: std.net.curl.CurlException Peer certificate cannot be authenticated with given CA certificates on handle 8C5090 at std\net\curl.d(3504) And why does curl crash when it encounters HTTPS anyway?https://d.puremagic.com/issues/show_bug.cgi?id=9737 SSL usage example: ----- auto http = HTTP(); // Set the CA certificate bundle file to use for SSL peer verification // To dowload this file (or generate it yourself) see http://curl.haxx.se/docs/caextract.html // For more information about SSL peer verification see http://curl.haxx.se/docs/sslcerts.html http.caInfo("cacert.pem"); auto resp = get("https://google.com", http);
Nov 11 2013
Okay, I have something working. Pretty annoying process though. This could really do with some solid documentation + examples by someone who knows what they're talking about. I'd like to think get(url) should be really easy, and shouldn't waste hours of someone's time to understand and call. On 11 November 2013 21:06, Tavi Cacina <octavian.cacina outlook.com> wrote:On Monday, 11 November 2013 at 09:53:38 UTC, Manu wrote:First-chance exception: std.net.curl.CurlException Peer certificate cannot be authenticated with given CA certificates on handle 8C5090 at std\net\curl.d(3504) And why does curl crash when it encounters HTTPS anyway?https://d.puremagic.com/issues/show_bug.cgi?id=9737 SSL usage example: ----- auto http = HTTP(); // Set the CA certificate bundle file to use for SSL peer verification // To dowload this file (or generate it yourself) see http://curl.haxx.se/docs/caextract.html // For more information about SSL peer verification see http://curl.haxx.se/docs/sslcerts.html http.caInfo("cacert.pem"); auto resp = get("https://google.com", http);
Nov 11 2013