How to call method name instead of local api url
i have this javascript function which calls the method inside the api thru url
function refreshBracket(guid) {
console.log(guid);
$.get("https://localhost:44369/api/Bracket/" + guid, (response)=>testFunction(JSON.parse(response.teams), JSON.parse(response.results), guid));
}
method inside the controller
public IHttpActionResult Get(string id)
{
Debug.WriteLine(id);
DataSet ds = DBAccess.ExecuteQuery("select * from abc where guid='" + id + "'");
return Ok(new
{
teams = ds.Tables[0].Rows[0]["Teams"],
results=ds.Tables[0].Rows[0]["Results"]
});
}
what i want is instead of this static url, i can directly call the method name https://localhost:44369/api/Bracket/
can we call the function like this web method