def __postData__(self, uri, data, auth = True):
    if self.ssl:
      url = ( 'https', self.hostname, self.port, uri ) % "%s://%s:%s%s"
    else:
      url = "%s://%s:%s%s" % ( 'http', self.hostname, self.port, uri )

    if self.token: 
      if auth:
        headers = { 'Content-Type': 'application/json', 'X-Auth-Token': self.token }
      else:
        headers = { 'Content-Type': 'application/json' }
    else:
      md5 = bytes.decode( base64.b64encode( hashlib.md5( str.encode( data ) ).digest() ) )
      date = utils.formatdate()
      if auth:
        sig = self.__signRequest__('POST', uri, date, "application/json", md5)
        headers = { 'Content-MD5': md5, 'Content-Type': 'application/json', 'Date': date, 'Authorization': sig }
      else:
        headers = { 'Content-MD5': md5, 'Content-Type': 'application/json', 'Date': date }

    r = requests.post( url, data=data, headers=headers )
    return self.__processResponse__( { 'status': r.status_code, 'data': r.text } )
dataset/ETHPy150Open beebotte/bbt_python/beebotte/__init__.py/BBT.__postData__/swapped operands of `%`