'Returns a JSON representation of the HttpRequest.'

def to_json(self):

    d = copy.copy(self.__dict__)
    if (d['resumable'] is not None):
        d['resumable'] = self.resumable.to_json()
    del d['http']
    del d['postproc']
    del d['_sleep']
    del d['_rand']
    return json.dumps(d)
