Base solution for your next web application
Open Closed

How to versioning the webapi #1489


User avatar
0
hkcf created

If i want to use request header for versioning, how to do that by using aspnetboilerplate ?

Thanks!


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can define an interface on your Core module like IApiVersionRetreiver which contains a method GetApiVersion(). Iimplement it on Web project and get api version from Request Header. In application service, just inject IApiVersionRetreiver and use it's GetApiVersion method.