I am always getting the this error.
{"status":false,"error":"Unknown method."}
But all syntax are correct from my side. because everything is working fine on the browser but same URL integration on the devices gives the 'unknown method error' . I am using this 'get' method. Sample URL
SITEURL/api/login/test?req_type=custom
Does I am missing something while integrating? any setting anything.. I have just included the library and rest config file yet. and working Please help asap. Thank you in advance.
You also need to check that from device which method your are getting means they are sending 'POST' or 'GET' so you can update your function name accordingly.
In my case I have done the function name as _get to the methods but from device methods of sending parameter is 'POST' which I am trying to access as 'GET'.
So please cross check this once. :) Hope this help anyone.
I think your problem is the name of controller is the same with the name of method try to make a test:
if the name of your controller is:
I have experienced this problem on hmvc structure.
When you create a method with the library, you need to append the type of request you are going to make to it.
So, if your method is
test
, and you are making aGET
request to it, it needs to look like this:Same with
POST
requestsSame with
PUT
, andDELETE
as well.NB This is only a guess since you didn't include any of your code for some reason.