One possible solution is to use a proxy. There are a number of specialized HTTP[S] or SOCKS proxies, some of which may be ideally suited for this use or at least easily adaptable to it. The proxy I use most often is called Burp Suite, and is intended for web site testing and isn't really ideal for your use, but it could technically be coerced into doing what you want.
Preserving the actual TLS traffic including authentication and integrity is a bit of a weird/tricky thing to do. You can record it easily enough using any tool capable of packet capture, but unless you store handshake, the traffic, the symmetric (bulk) encryption key, and the integrity metadata, it will be tricky to prove any given server sent that data.
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one. (Immediately before; refresh the list-of-threads page before posting.)
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.