My default toy project when trying out a new language starts with the following request:
curl -v -q -k --cert client-``2048``.crt --key client-``2048``.key
'https://identitysso-cert.betfair.com/api/certlogin'
-H
'X-Application:{{appId}}'
--data-urlencode
'username={{username}}'
--data-urlencode
'password={{password}}'
However it is a bit unclear if the basic-cli platform actually has support for such a request?
Hi @Henrik Larsson,
basic-cli does not support passing certs, but we use rust hyper under the hood and it does support passing certs. This file would be where most of the modifications need to happen to support this. It is the first time someone has requested this feature so it seems out of scope for "basic"-cli but everyone is welcome to weigh in on that decision.
@Anton thanks for the reply, I will look into that, another question is if the Tcp stream do support SSL sockets? I am trying to connect to a port 443 however im getting an error of (TcpReadErr ConnectionReset)
I would expect that to work, can you file an issue on the basic-cli repo with code to reproduce the problem?
I have done changes to a local version basic-cli to get it to work, will make a proper fork and post here after work today.
@Anton This is the changes I made to make basic-cli streams work with my use case (no changes for http was needed, I did not have to use certs) https://github.com/roc-lang/basic-cli/pull/331/files
This is far from mergable but it shows the changes. Sorry if a draft PR is not the right way to show this, then you can just close it.
No, this is great :)
Last updated: Jul 06 2025 at 12:14 UTC