doc: modernize and fix code examples in https.md
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
doc, https
- replace
var
byconst
- comment out ellipses
- update code example (provide relevant test file path, add missing option)