The plan here is to investigate the network efficiency of HTTP/2.0 versus HTTP/1.1 by gently hitting Twitter's API. The above script does 5 HTTP requests to Twitter and gets the responses.
In my tests I'm showing an insane different, whereby HTTP/2.0 transfers 250 kB of data and HTTP/1.1 transfers 2.2 MB. This difference seems insane to me, so I'd like to work out why it's happening.
To run this, you'll need Python 3.3. Install the requirements listed in requirements.txt
, and then go to Twitter's API page and set up an application. Get the values listed in the script for your application, fill them in, and run them, using Wireshark to check how much traffic was sent. Let me know what you find!