TLSSocket supported?
See original GitHub issueI’m trying to test this GOT http client. https://github.com/sindresorhus/got
They use a library that checks the socket is a TLSSocket.
socket instanceof TLSSocket
Is there a way to get Nock to use a TLSSocket instead of a Socket? I tried using “https://” protocol, but the Socket seen by the Got Client is not a TLSSocket
const mockReq = nock("https://localhost") .get("/test") .reply(200, { measure: "true" });
The Got client has timings for tls connection, but my test is not getting the tls timing due to Socket not being a TLSSocket.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
TLS (SSL) | Node.js v19.3.0 Documentation
SNI: Allows the use of one TLS server for multiple hostnames with different certificates. Pre-shared keys#. TLS-PSK support is available as an alternative...
Read more >TLSSocket - API references and tutorials - Mbed
To use secure TLS connections, the application uses the TLSSocketWrapper through the Socket API, so existing applications and libraries are compatible.
Read more >ssl — TLS/SSL wrapper for socket objects — Python 3.11.1 ...
It supports additional methods such as getpeercert() , which retrieves the certificate of the other side of the connection, and cipher() , which...
Read more >Tls - node - Read the Docs
Node.js is compiled with SSLv2 and SSLv3 protocol support by default, but these protocols are ... TLSSocket instance when the threshold is exceeded....
Read more >"tls" | typescript - v3.7.7
It can be assigned any of the supported TLS protocol versions, 'TLSv1.3', 'TLSv1.2', ... secureConnectListener?: function): TLSSocket; connect(port: number, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes! This works great! Thank you all for the quick turn-around!
Released
2.0.1
, do let me know if that works out.