Improve logging of HTTP requests and move two readJson() versions to a central place.