Closed vkukke closed 5 years ago
Hi @vkukke.
It looks like your APIs require and id
parameter. Try to remove the id
parameter from the GetProducts
API.
yikes. its a typo. Apologies. Removed it and same result. FYI
[HttpGet]
public Task<ActionResult> GetProducts()
{
return Task.FromResult<ActionResult>(new OkResult());
}
Closing this issue as it's resolved now.
I'm trying to setup Web APIs using aspnetcore 2.1.4.
I have a console app which does the following:- IWebHost managementHost = ManagementHostBuilder.Build(); managementHost.Start();
I have another dll where I have
Code snippets are provided below WebHostBuilder Has mostly configuring kestrel and sets up the startup class (ManagementStartup)
Startup Class
Controller class
After I build and hit F5 I do a curl as follows:- curl --header "Content-Type: application/json; charset=utf-8" http://127.0.0.1:5889/api/products
My controller is not being hit. What am I missing. The port number is what I have configured kestrel to run under.