def METHOD_NAME(self, url, data=None, method="GET"):
    response, info = fetch_url(self.module, url, data=data, headers=self.headers, method=method)
    status_code = info["status"]
    if status_code == 401:
        self.module.fail_json(failed=True, response=info, msg="Unauthorized to request '%s' on '%s'" % (method, url))
    elif status_code == 403:
        self.module.fail_json(failed=True, response=info, msg="Permission Denied for '%s' on '%s'" % (method, url))
    elif status_code == 404:
        self.module.fail_json(failed=True, response=info, msg="Not found for request '%s' on '%s'" % (method, url))
    elif status_code in (200, 201):
        return self.module.from_json(response.read())
    self.module.fail_json(failed=True, response=info, msg="Alerta API error with HTTP %d for %s" % (status_code, url))