awhitney42 / codeigniter-restserver-resources Goto Github PK
View Code? Open in Web Editor NEWAn example controller that uses the fully RESTful server implementation https://github.com/chriskacerguis/codeigniter-restserver
An example controller that uses the fully RESTful server implementation https://github.com/chriskacerguis/codeigniter-restserver
Thanks for the better lib.
But I think you need a more detailed README for this and a api key example.
=)
Hi,
I was looking at your sample:
$route['api/([a-z0-9]+)/(\d+)'] = 'api/$1/index/$2';
but this does not remove index from my url. Any ideas?
Thank you in advance.
It seems that you are not parsing post parameters in delete.
The solution I found is the following:
in:
protected function _parse_delete(){
parse_str(file_get_contents('php://input'), $this->_delete_args);
}
change for :
protected function _parse_delete(){
if ($this->request->format)
{
$this->request->body = file_get_contents('php://input');
}
else
{
parse_str(file_get_contents('php://input'), $this->_delete_args);
}
}
I think that this solves the problem.
Thanks for the library.
Line: 39
// If no key level provided, give them a rubbish one
$level = $this->_put('level') ? $this->_put('level') : 1;
$ignore_limits = $this->_put('ignore_limits') ? $this->_put('ignore_limits') : 1;
I changed it into:
// If no key level provided, give them a rubbish one
$level = $this->_post('level') ? $this->_post('level') : 1;
$ignore_limits = $this->_post('ignore_limits') ? $this->_post('ignore_limits') : 1;
Now I can get a not rubbish key, Is this a bug?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.