<s> import requests <EOL> class Transport ( object ) : <EOL> def __init__ ( self , cache = None , timeout = <NUM_LIT> ) : <EOL> self . cache = cache <EOL> self . timeout = timeout <EOL> def load ( self , url ) : <EOL> if self . cache : <EOL> response = self . cache . get ( url ) <EOL> if response : <EOL> return bytes ( response ) <EOL> response = requests . get ( url , timeout = self . timeout ) <EOL> if self . cache : <EOL> self . cache . add ( url , response . content ) <EOL> return response . content <EOL> def post ( self , address , message , headers ) : <EOL> response = requests . post ( address , data = message , headers = headers ) <EOL> return response </s>
