'Return a string in key=value&key=value form
Values are assumed to be encoded in the format specified by self._encoding,
and are subsequently URL encoded.
Args:
post_data:
A dict of (key, value) tuples, where value is encoded as
specified by self._encoding
Returns:
A URL-encoded string in "key=value&key=value" form'

def _EncodePostData(self, post_data):

    if (post_data is None):
        return None
    else:
        return urllib.urlencode(dict([(k, self._Encode(v)) for (k, v) in post_data.items()]))
