def postmap(self, path, valuemap=None, query=None):
        """
        Performs a POST request as per post() but the response content type
        is required to be "application/json" and is processed as with getmap().
    """
        code, data, ctype = self.post(path, valuemap, query)
        if ctype != 'application/json':
            self.log.error("Expecting JSON from POST of '%s', got '%s'", self.lastpath, ctype)
            raise HttpError(code=400, content_type='text/plain', content='Remote returned invalid content type: '+ctype)
        try:
            result = json.loads(data)
        except Exception as e:                                                                  # pragma: no cover
            self.log.error("Could not load JSON content from POST %r -- %s", self.lastpath, e)
            raise HttpError(code=400, content_type='text/plain', content='Could not load JSON content')
        return result
Performs a POST request as per post() but the response content type
        is required to be "application/json" and is processed as with getmap().