Issue
I have a web application hosted in servlet container. It is making call to google sheet api to create google sheet. It is throwing GoogleJsonResponseException with message 401 unauthorized. I want to see HTTP traffic between client program and google server. How to do that? Any other way to debug?
Solution
I use two tools for this purpose, both free. The first is Fiddler from Telerik. This tool is an http proxy that intercepts your traffic and lets you dissect the underling http. I have found though that not all traffic is intercepted. I use it on Windows and I think it intercepts traffic that runs thru http.sys.
My second tool is Wireshark which is a network packet sniffer and intercepts http traffic that sometimes does not get picked up by Fiddler.
There is tons of articles and tutorials on how to use both tools. If your traffic is using SSL/TLS then it can be tricky to setup. I have had success with Fiddler, but not Wireshark, even where I had the private key.
Both tools are indispensable.
Answered By - E LaRoche