RESTful Sub Resource Handling Url |
hi let jump in the problem
i m writing Restful Api beck end With Ci4 if have two controller extend from ResourceController contact And ContactFile how manger URL for sub Resuoures http://api.example.com/contact /* get*/ http://api.example.com/contact /* post*/ http://api.example.com/contact/{id} /* put*/ http://api.example.com/contact/{id} /*delete */ this code is user for contactController PHP Code: $routes->resource('contact'); i need these urls bellow according to restful api rules http://api.example.com/contact /{id}/contactfile* get*/ http://api.example.com/contact /{id}/contactfile* post*/ http://api.example.com/contact/{id} /contactfile{id}/* put*/ http://api.example.com/contact/{id} /contactfile/{id}/*delete */ and this code is no good for sub resource Code: $routes->resource('contactfile'); this is work but not best way handle request it need two time request for one for Parent(contactCtl) then childern(contacFileCtl) here is code with angular 10 Get Http Request its nested request Code: public getSingelPost(id: number) { please help me thnak ci funs
Enlightenment Is Freedom
|
Messages In This Thread |
RESTful Sub Resource Handling Url - by paliz - 10-19-2020, 11:43 AM
RE: RESTful Sub Resource Handling Url - by paliz - 10-22-2020, 09:56 AM
RE: RESTful Sub Resource Handling Url - by nc03061981 - 10-23-2020, 01:55 AM
RE: RESTful Sub Resource Handling Url - by nc03061981 - 10-23-2020, 06:18 AM
RE: RESTful Sub Resource Handling Url - by paliz - 10-23-2020, 07:38 AM
RE: RESTful Sub Resource Handling Url - by nc03061981 - 10-23-2020, 06:09 PM
RE: RESTful Sub Resource Handling Url - by paliz - 10-25-2020, 04:26 AM
|