Welcome Guest, Not a member yet? Register   Sign In
Is Codeigniter 4 supports "Verb Based Routing"?
#1

[font=OpenSansRegular, Arial, Verdana, Droid-Sans, sans-serif]GET         /api/order      Returns all orders
GET         /api/order/3   Returns details order #3
POST       /api/order     Create new order
PUT         /api/order/3   Update order #3
DELETE   /api/order/3   Delete order #3


The above is considered [font=OpenSansSemibold, Arial, Verdana, Droid-Sans, sans-serif]verb-based routing. The URLs above only contain the controller name and an optional id. So the Web API uses the HTTP verb of the request to determine the action method to execute in your ApiController subclass.[/font][/font]
Reply
#2

according to CI4 documentation, it is possible (https://bcit-ci.github.io/CodeIgniter4/g....html#id14)
Reply
#3

(This post was last modified: 02-21-2017, 08:02 AM by InsiteFX.)

CodeIgniter 4 Development Users Guide - Using HTTP verbs in routes
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB