Issues With Using Restfulyii Extension And Android

When I using the curl example in the Extension page, I found that my server doesn’t read the variable name “X_REST_USERNAME” and “X_REST_PASSWORD”, later on I found that all header server received, if the variable name has “", server will ignore it. if the variable name in lower case, server will automatically append it with the prefix "HTTP” and make it upper case. for example, if in header, you have a variable called “username”, then on the server side script, in my case is PHP, I will get the data with $_SERVER['HTTP_USERNAME"]. I am not sure whether is my server(apache + php) caused the issue or not. Thanks if anyone can explain it.

Now I try to use it as an standard RESTful API with android. Here is my app design:

app will send the API key in the header to identify itself the request is from the app.

if the user is not login when request some data that required user’s login, then ask for login.

after login, an user token will be generated for the user, so if the data required user’s login, the sandard request will be api key + user token.

unfortunately the example in the RestfulYii extension is based on the javascript / jquery, anyone can provide the detail of how it suppose to work with android

Many thanks!