Welcome Guest, Not a member yet? Register   Sign In
Creating an API
#1

[eluser]dmorin[/eluser]
I'm starting to add an API to my CI site and I wanted to ask the community if they have any advice. So specific things I'm wondering:

Does anyone have a hack to get CI to ignore the querystring part of the url and just route based on the url before the "?"? I would like to be able to pass parameters through the querystring but in my experience it completely screws up the routing. This is one place I would love to see CI improve. (contrary to CI belief, $_GET is not the root of all evil ;-) )

Other apis I've seen have used a fake filetype syntax to indicate the type of output they would like to receive (ex: user.json versus user.xml). I'm assuming this is possible through routing, but if anyone has anything specific, please share!

Any other best practices or things you like/dislike about other APIs? Thanks in advance!


Messages In This Thread
Creating an API - by El Forum - 08-31-2008, 02:11 PM
Creating an API - by El Forum - 08-31-2008, 03:21 PM
Creating an API - by El Forum - 08-31-2008, 05:43 PM
Creating an API - by El Forum - 08-31-2008, 05:46 PM
Creating an API - by El Forum - 08-31-2008, 06:19 PM
Creating an API - by El Forum - 08-31-2008, 06:33 PM
Creating an API - by El Forum - 08-31-2008, 07:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB