public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "v1/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
I am trying to create API inside a MVC application project, but I am getting below
Error 'System.Net.Http.HttpMessageHandler' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I tried to google, but not much help I got.
Can any one suggest me a better way.