0

I don't know how restler behaves. when i am passing getuser/2 it works fine, but when i am passing /getalluser it gives

{
error: {
code: 404,
message: "Not Found"
}
}

But when i changed the function name getalluser to buyalluser it works fine.

Can anybody tell me whats the problem with my function names in restler framework?

Marc B
  • 356,200
  • 43
  • 426
  • 500
ketul shah
  • 413
  • 2
  • 7
  • 17
  • without knowing anything about restler... do you actually have a `getalluser` method in the underlying class? obviously you've got `getuser` and `buyalluser`. – Marc B Feb 12 '13 at 19:05
  • yeah i have getalluser and it works fine.its just matter of function name.so changed it to buyalluser. && it works fine but i want to know that what was wrong in getalluser function name in restler. – ketul shah Feb 12 '13 at 19:09
  • Restler is using `get`, `post`, `put`, `delete` as method prefixes to automatically map them to respective HTTP method/verb GET is the default HTTP method, so if you dont prefix a method with any of the above, it will be mapped to GET method. – ketul shah Feb 12 '13 at 19:22

1 Answers1

0

As you have already found out

Restler is using get, post, put, delete as method prefixes to automatically map them to respective HTTP method/verb GET is the default HTTP method, so if you dont prefix a method with any of the above, it will be mapped to GET method.

Arul Kumaran
  • 983
  • 7
  • 23