Even easier way to log requests is to use something to man-in-the-middle your own connection, like MITMProxy (which, coincidentally, is written in Python).
I've used it a lot to unearth APIs and make programs that utilize them.
I've used it a lot to unearth APIs and make programs that utilize them.