Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chibi net http-client) does not seem to support HTTPS #878

Open
Zambito1 opened this issue Dec 22, 2022 · 2 comments
Open

(chibi net http-client) does not seem to support HTTPS #878

Zambito1 opened this issue Dec 22, 2022 · 2 comments

Comments

@Zambito1
Copy link

> (http-get "http://httpbin.org")
#<Input-Port 140185626098688>
> (http-get "https://httpbin.org")
ERROR: couldn't retrieve url
    "https://httpbin.org"
    ("HTTP/1.1" 400 "Bad Request")

For any HTTP URL this seems to work, but for any HTTPS URL I receive the error shown. I believe this library should handle HTTPS without error.

I realize this is not the easiest task given the dependency on SSL. Perhaps a reasonable solution would be to probe the system for common HTTP clients (such as cURL) and offload HTTPS requests to that.

@ashinn
Copy link
Owner

ashinn commented Dec 22, 2022

snow-chibi actually has an option to use curl.

Another option is (chibi ssl), an external library on snow-fort used by (chibi smtp). Without requiring it in the core, we could check for the presence of it and load it dynamically on https requests.

@Zambito1
Copy link
Author

Ah nice, I missed that library. I'm not sure how much effort that would take to do in a portable way. Another possibility could be to add a parameter object so the consumer can provide required SSL procedures. This would increase the complexity of using this library when using HTTPS, but I think it would be easier to implement and would likely be more flexible, since alternative SSL libraries could be used if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants