Update client.py

added HTTP emulation support