Closed elaine-jackson closed 5 years ago
The same issue can actually be reproduced with the standard library (See: https://github.com/ulayer/CrystalProxmox/blob/master/src/CrystalProxmox.cr for an example). I question whether this is an issue Crest can address. Perhaps the issue should be closed, I'll leave that decision to whomever triages issues.
Hi. Definitely, this is Crystal issue.
But, can you try:
Crest::Resource.new(@pve_cluster, tls: OpenSSL::SSL::Context::Client.insecure)
or
HTTP::Client.new(URI.parse(@pve_cluster), tls: OpenSSL::SSL::Context::Client.insecure)
Exporting OpenSSL from Homebrew’s pkg-config fixes part of the issue. Sending an invalid content type header to the server can also trigger a similar error with OpenSSL. This is really a two part issue if you think about it some more. More graceful error handing with more descriptive exception messages would be nice for Crystal to implement. I ended up using HTTP::Client
from the standard library for my project however I’ll consider Crest for future projects :)
Cordially, Nathaniel Suchy
On Apr 15, 2019, at 5:02 AM, Anton Maminov notifications@github.com wrote:
Hi. Definitely, this is Crystal issue.
But, can you try:
Crest::Resource.new(@pve_cluster, tls: OpenSSL::SSL::Context::Client.insecure) or
HTTP::Client.new(URI.parse(@pve_cluster), tls: OpenSSL::SSL::Context::Client.insecure) — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
When attempting to contact a JSON API over HTTPS I get an OpenSSL Error. I'm able to access the website in Safari without an issue so I know it's not a server issue. Could the developers please advise on this?
System information: macOS 10.12.6 (16G1918) ASDF Version Manager Crystal 0.27.2 Crest installs as dependency from
github: mamantoha/crest
Example code:
Log output: