Hi i am creating an API using JSON. I using a website with url "http://www.domain.com/api/". I have writtin all API with respect to their functions in a single handler file and accessing this handler file from an index file (for testing purpose from local server) such that the url is "http://www.domain.com/api/index.php" and i want this url to be "http://www.domain.com/api/".
My variable used for JSON is:
data = '{"appId":"'+appId+'",
"m":"login",
"email":"abc@yahoo.com",
"pwd":"abcd",
"deviceToken": "111111111"}';
I am sending this using ajax from index file to fetch function defined in handler file.
I heard that we can do this using rewriting url. Can anyone tell me How to rewrite url for this and how to fetch these variables. "http://www.domain.com/api/". this function name is 'm' variable which is used to fetch respected function from handler file.
Can anyone help? I am new with JSON (though most of the work is complete, but i am unable to meet the url requirement)
No comments:
Post a Comment