• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Routing by Header

#1
Question 
So I have an API that I want to route by the header `Accept`. How do you do this with the routing in CI 3?

So if you nav to www.site.com/api/user it will look at the header Accept find the version in the header and then route to that controller class. I need this in order to manage api versions in the header.
Reply

#2
You would need to extend the router then. CI router can not do this on its own.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.