Skip to content

Instantly share code, notes, and snippets.

@asvetlov
Created June 29, 2017 13:56
Show Gist options
  • Save asvetlov/72cf31c668a7c87f5a040b028c5409c9 to your computer and use it in GitHub Desktop.
Save asvetlov/72cf31c668a7c87f5a040b028c5409c9 to your computer and use it in GitHub Desktop.
import aiohttp
class CustomRequest(aiohttp.ClientRequest):
def update_transfer_encoding(self):
super().update_transfer_encoding()
if self.method == 'GET':
self.headers.popall('Content-Length', None)
session = ClientSession(request_class=CustomRequest)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment