We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to add my api class and map it to the empty string like so.
$r->addAPIClass('Group', '');
However when I do this my manual routing breaks in the class
/** * Manually routed method. * * @url GET / * @return array */ protected function all() { return $this->db->formatSelect($this->db->all($_GET['uid'])); }
This is because Restler now thinks that my authentication query string is a parameter to this method. If I add
@url GET /{id}
and then call
GET http://localhost/api/group/?uid=459&ukey=....
$id comes through as the query string. I can fix this by added a double forward slash // after group but I would like not to.
The text was updated successfully, but these errors were encountered:
I'm a bit confused with your examples id in your routing is the same as uid you are getting?
id
uid
Please help me understand the situation better
Sorry, something went wrong.
Sorry for the confusing. So when I call
GET http://localhost/api/group/?uid=459&ukey=772f6ee7135efacd55f5
I expect the first case of the manual routing to be matched * @url GET / but instead the second case is matched and $id becomes the whole query string
/** * * @url GET / * @url GET /{id} * @return array */ protected function all($id = NULL) { var_dump($id); //uid=459&ukey=772f6ee7135efacd55f5 return $this->db->formatSelect($this->db->all($_GET['uid'])); }
Arul-
No branches or pull requests
I would like to add my api class and map it to the empty string like so.
$r->addAPIClass('Group', '');
However when I do this my manual routing breaks in the class
This is because Restler now thinks that my authentication query string is a parameter to this method. If I add
@url GET /{id}
and then call
GET http://localhost/api/group/?uid=459&ukey=....
$id comes through as the query string. I can fix this by added a double forward slash // after group but I would like not to.
The text was updated successfully, but these errors were encountered: