Handling intermittent SSL handshake and cookie persistence issues with std.net.curl
dlang_dev
necoxiy500 at pumpoly.com
Tue Sep 22 14:45:22 UTC 2026
Hello everyone, I have been working on a small automation tool in
D to periodically query utility billing details for a local
client portal. I was following [this
guide](https://lescobillcheck.pk/) on how the reference number
lookups and request parameters are structured, but I am running
into a few frustrating networking issues when using std.net.curl.
First, the remote endpoint frequently drops the connection or
throws a CurlException during the SSL/TLS negotiation phase when
multiple requests are triggered sequentially. Second, the portal
seems to rely on session cookies across redirects to validate the
query, and my current HTTP client setup fails to retain them
properly without manually inspecting and copying the Set-Cookie
headers on every response.
I am wondering whether there is a cleaner, more idiomatic way in
std.net.curl to maintain a persistent cookie jar and adjust TLS
cipher options, or if it would be much more reliable to migrate
this workflow over to vibe.http.client instead. Any suggestions
or code snippets from folks who have dealt with stubborn legacy
portals would be greatly appreciated.
More information about the Digitalmars-d-learn
mailing list