While connecting to https server by skipping the SSL certificates(I mean allow all hosts) .
After loggin in to such https server do we need to login everytime to fire get or post requests.
I am trying this in android.
Any good pointers would be helpful.
Login to https server using httpclient(Skip SSL by allowing all)
Fire the simple Get request after login.
Is there any sample code base for this simple scenario.
First of all you have to place your code in an async task as network calls don’t run on the main thread.
Then you can use this something like this:
This code makes a JSon request to a WCF webservice and gets a JSon response which is parsed in the end to a specific object that is then returned.
This class serves only to instance a Custom Socket Factory which allows to accept all valid and invalid server certificates. It is not advised to incurr in such practices on sensitive information services / transports, because accepting all certificates as valid allows a man-in-the-middle attack, as some other vulnerabilities.
Hope this helps you.
Best of luck.