Skip to content Skip to sidebar Skip to footer

Android Httppost Login Action

Actually I'm doing tests if my application can Login from android phone via http post.I'm sending a few extra parameters which I need for testing the application,but everytime I ru

Solution 1:

Have you checked whether you can login to your server using desktop browser or some utility like curl command line utility? Username and password hash mentioned in your comment and in code are different. You should be able to see parameters received on server with the help of server logs.

Solution 2:

To get the response you should do like this:

HttpEntityentity= response.getEntity();

        Stringhtml=null;
        if (entity != null) {
            InputStreaminstream= entity.getContent();
            try {
                html = streamToString(instream);
            } finally {
                instream.close();
            }
        }

If you have any further questions don't hesitate to ask me.

Post a Comment for "Android Httppost Login Action"