def METHOD_NAME(req: Dict[str, Any], table_path: Optional[str] = None) -> ConfigDef:
    requests = Request(req["url"])
    if req["method"] == "GET":
        resp = requests.get(_headers=req["headers"])
    elif req["method"] == "POST":
        resp = requests.post(_data=req["params"], _headers=req["headers"])
    elif req["method"] == "PUT":
        resp = requests.put(_data=req["params"], _headers=req["headers"])
    else:
        raise RuntimeError(f"Unknown method {req['method']}")
    if resp.status != 200:
        raise RuntimeError(f"Request to HTTP endpoint not successful: {resp.status}: {resp.reason}")
    payload = json.loads(resp.read())
    if table_path is None:
        table_path = search_table_path(payload)
    ret: Dict[str, Any] = {
        "version": 1,
        "request": {
            "url": req["url"],
            "method": req["method"],
            "params": {key: False for key in req["params"]},
        },
        "response": {
            "ctype": "application/json",
            "orient": "records",
            "tablePath": table_path,
            "schema": gen_schema_from_path(table_path, payload),
        },
    }
    return ConfigDef(**ret)