def to_postdata(self):
        d = {}
        for k, v in self.iteritems():
            d[k.encode('utf-8')] = to_utf8_optional_iterator(v)

        # tell urlencode to deal with sequence values and map them correctly
        # to resulting querystring. for example self["k"] = ["v1", "v2"] will
        # result in 'k=v1&k=v2' and not k=%5B%27v1%27%2C+%27v2%27%5D
        return urllib.urlencode(d, True).replace('+', '%20')
Write token to credential file.
dataset/ETHPy150Open ibagrak/algae/gae/libs/oauth2/__init__.py/Request.to_postdata--crossover with--dataset/ETHPy150Open apache/libcloud/libcloud/common/google.py/GoogleOAuth2Credential._write_token_to_file