<s> from pulsar . apps . http import HttpClient <EOL> from . utils import wait <EOL> class GreenHttp : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , http = None ) : <EOL> self . _http = http or HttpClient ( ) <EOL> def __getattr__ ( self , name ) : <EOL> return getattr ( self . _http , name ) <EOL> def get ( self , url , ** kwargs ) : <EOL> kwargs . setdefault ( '<STR_LIT>' , True ) <EOL> return self . request ( '<STR_LIT:GET>' , url , ** kwargs ) <EOL> def options ( self , url , ** kwargs ) : <EOL> kwargs . setdefault ( '<STR_LIT>' , True ) <EOL> return self . request ( '<STR_LIT>' , url , ** kwargs ) <EOL> def head ( self , url , ** kwargs ) : <EOL> return self . request ( '<STR_LIT>' , url , ** kwargs ) <EOL> def post ( self , url , ** kwargs ) : <EOL> return self . request ( '<STR_LIT:POST>' , url , ** kwargs ) <EOL> def put ( self , url , ** kwargs ) : <EOL> return self . request ( '<STR_LIT>' , url , ** kwargs ) <EOL> def patch ( self , url , ** kwargs ) : <EOL> return self . request ( '<STR_LIT>' , url , ** kwargs ) <EOL> def delete ( self , url , ** kwargs ) : <EOL> return self . request ( '<STR_LIT>' , url , ** kwargs ) <EOL> def request ( self , method , url , ** kw ) : <EOL> return wait ( self . _http . request ( method , url , ** kw ) , True ) </s>
