def _post(self, url, body, error_message):
        url = urljoin(self.host, url)

        if self.verbose:
            print "URL: %s" % url
            print "Request Body:\n%s" % body
        if self.debug:
            return

        try:
            resp = request(url, method='POST', body=body,
                       username=self.username,
                       password=self.password)
        except urllib2.HTTPError, e:
            xml = e.read()
            if self.verbose:
                print xml
            message = ElementTree.fromstring(xml).findtext('.//message')
            raise Exception(error_message+": "+message)
        return resp
dataset/ETHPy150Open rckclmbr/git-crucible/crucible/client.py/API._post/original